Skip to main content
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

x-store-id
string
header
required

Body

application/json
name
string
required
design
object

Configuration for the visual layout, display options, and colors of a custom checkout.

status
string

Response

201 - application/json

Checkout link created successfully.

id
string
store_id
string
name
string
design
object

Configuration for the visual layout, display options, and colors of a custom checkout.

status
string
views
integer
sales
integer
created_at
string<date-time>