Checkouts
Create a new checkout link
Creates a new custom checkout link for a product.
-
Request Headers:
x-store-id(string, required): The ID of the store making the request.
-
Request Body:
name(string, required): Name of the checkout link.design(object, optional): Design details for the checkout.status(string, optional): Status of the checkout (default: active).
-
Response: The newly created checkout link.
Enables customers to have specialized checkout processes tailored to certain products or promotions.
POST
/
checkout-links
Create a new checkout link
curl --request POST \
--url https://api.blink.store/v1/checkout-links \
--header 'Content-Type: application/json' \
--header 'x-store-id: <api-key>' \
--data '
{
"name": "<string>",
"design": {
"display_options": {
"preview_button": true,
"discount_code": true,
"refund_policy": true
},
"override_theme": true,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>"
}
'import requests
url = "https://api.blink.store/v1/checkout-links"
payload = {
"name": "<string>",
"design": {
"display_options": {
"preview_button": True,
"discount_code": True,
"refund_policy": True
},
"override_theme": True,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>"
}
headers = {
"x-store-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-store-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
design: {
display_options: {preview_button: true, discount_code: true, refund_policy: true},
override_theme: true,
colors: {
button: '<string>',
button_hover: '<string>',
button_text: '<string>',
button_text_hover: '<string>',
link: '<string>',
checkbox: '<string>',
selection_border: '<string>',
selection_background: '<string>'
}
},
status: '<string>'
})
};
fetch('https://api.blink.store/v1/checkout-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blink.store/v1/checkout-links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'design' => [
'display_options' => [
'preview_button' => true,
'discount_code' => true,
'refund_policy' => true
],
'override_theme' => true,
'colors' => [
'button' => '<string>',
'button_hover' => '<string>',
'button_text' => '<string>',
'button_text_hover' => '<string>',
'link' => '<string>',
'checkbox' => '<string>',
'selection_border' => '<string>',
'selection_background' => '<string>'
]
],
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-store-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blink.store/v1/checkout-links"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-store-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blink.store/v1/checkout-links")
.header("x-store-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/checkout-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-store-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"design": {
"display_options": {
"preview_button": true,
"discount_code": true,
"refund_policy": true
},
"override_theme": true,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>",
"views": 123,
"sales": 123,
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Previous
Retrieve a custom checkout linkFetches details of a specific custom checkout link by its ID.
- **Request Headers:**
- `x-store-id` (string, required): The ID of the store requesting the information.
- **Path Parameters:**
- `id` (string, required): ID of the checkout link.
- **Response:** Detailed information about the checkout link.
Allows store owners to examine and verify individual custom checkout configurations.
Next
⌘I
Create a new checkout link
curl --request POST \
--url https://api.blink.store/v1/checkout-links \
--header 'Content-Type: application/json' \
--header 'x-store-id: <api-key>' \
--data '
{
"name": "<string>",
"design": {
"display_options": {
"preview_button": true,
"discount_code": true,
"refund_policy": true
},
"override_theme": true,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>"
}
'import requests
url = "https://api.blink.store/v1/checkout-links"
payload = {
"name": "<string>",
"design": {
"display_options": {
"preview_button": True,
"discount_code": True,
"refund_policy": True
},
"override_theme": True,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>"
}
headers = {
"x-store-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-store-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
design: {
display_options: {preview_button: true, discount_code: true, refund_policy: true},
override_theme: true,
colors: {
button: '<string>',
button_hover: '<string>',
button_text: '<string>',
button_text_hover: '<string>',
link: '<string>',
checkbox: '<string>',
selection_border: '<string>',
selection_background: '<string>'
}
},
status: '<string>'
})
};
fetch('https://api.blink.store/v1/checkout-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blink.store/v1/checkout-links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'design' => [
'display_options' => [
'preview_button' => true,
'discount_code' => true,
'refund_policy' => true
],
'override_theme' => true,
'colors' => [
'button' => '<string>',
'button_hover' => '<string>',
'button_text' => '<string>',
'button_text_hover' => '<string>',
'link' => '<string>',
'checkbox' => '<string>',
'selection_border' => '<string>',
'selection_background' => '<string>'
]
],
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-store-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blink.store/v1/checkout-links"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-store-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blink.store/v1/checkout-links")
.header("x-store-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/checkout-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-store-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"design\": {\n \"display_options\": {\n \"preview_button\": true,\n \"discount_code\": true,\n \"refund_policy\": true\n },\n \"override_theme\": true,\n \"colors\": {\n \"button\": \"<string>\",\n \"button_hover\": \"<string>\",\n \"button_text\": \"<string>\",\n \"button_text_hover\": \"<string>\",\n \"link\": \"<string>\",\n \"checkbox\": \"<string>\",\n \"selection_border\": \"<string>\",\n \"selection_background\": \"<string>\"\n }\n },\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"design": {
"display_options": {
"preview_button": true,
"discount_code": true,
"refund_policy": true
},
"override_theme": true,
"colors": {
"button": "<string>",
"button_hover": "<string>",
"button_text": "<string>",
"button_text_hover": "<string>",
"link": "<string>",
"checkbox": "<string>",
"selection_border": "<string>",
"selection_background": "<string>"
}
},
"status": "<string>",
"views": 123,
"sales": 123,
"created_at": "2023-11-07T05:31:56Z"
}