curl --request POST \
--url https://api.paywint.com/api/checkout/token/platform \
--header 'Content-Type: application/json' \
--header 'X-Platform-ID: <x-platform-id>' \
--header 'X-Signature: <x-signature>' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "USD"
}
'import requests
url = "https://api.paywint.com/api/checkout/token/platform"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "USD"
}
headers = {
"X-Platform-ID": "<x-platform-id>",
"X-Signature": "<x-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Platform-ID': '<x-platform-id>',
'X-Signature': '<x-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123, currency: 'USD'})
};
fetch('https://api.paywint.com/api/checkout/token/platform', 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.paywint.com/api/checkout/token/platform",
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([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'currency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Platform-ID: <x-platform-id>",
"X-Signature: <x-signature>"
],
]);
$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.paywint.com/api/checkout/token/platform"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Platform-ID", "<x-platform-id>")
req.Header.Add("X-Signature", "<x-signature>")
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.paywint.com/api/checkout/token/platform")
.header("X-Platform-ID", "<x-platform-id>")
.header("X-Signature", "<x-signature>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywint.com/api/checkout/token/platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Platform-ID"] = '<x-platform-id>'
request["X-Signature"] = '<x-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed.",
"data": {
"checkout_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"queryGeneratedTime": 1718006400
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Checkout SDK Token
Generates a short-lived, tamper-proof checkout token for initializing Paywint Inline Checkout.
This endpoint performs the following actions:
- Authenticates the platform using
X-Platform-IDandX-Signature - Resolves or creates a per-initiator signing secret
- Issues a signed checkout token embedding initiator and payer context
- Returns the token and its expiry for use by the frontend SDK
curl --request POST \
--url https://api.paywint.com/api/checkout/token/platform \
--header 'Content-Type: application/json' \
--header 'X-Platform-ID: <x-platform-id>' \
--header 'X-Signature: <x-signature>' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "USD"
}
'import requests
url = "https://api.paywint.com/api/checkout/token/platform"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "USD"
}
headers = {
"X-Platform-ID": "<x-platform-id>",
"X-Signature": "<x-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Platform-ID': '<x-platform-id>',
'X-Signature': '<x-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123, currency: 'USD'})
};
fetch('https://api.paywint.com/api/checkout/token/platform', 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.paywint.com/api/checkout/token/platform",
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([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'currency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Platform-ID: <x-platform-id>",
"X-Signature: <x-signature>"
],
]);
$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.paywint.com/api/checkout/token/platform"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Platform-ID", "<x-platform-id>")
req.Header.Add("X-Signature", "<x-signature>")
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.paywint.com/api/checkout/token/platform")
.header("X-Platform-ID", "<x-platform-id>")
.header("X-Signature", "<x-signature>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywint.com/api/checkout/token/platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Platform-ID"] = '<x-platform-id>'
request["X-Signature"] = '<x-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed.",
"data": {
"checkout_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"queryGeneratedTime": 1718006400
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Unique platform identifier (UUID). You receive this during onboarding. Must be sent with every API request.
HMAC-SHA256 request signature for authentication. Use your platform secret key to compute it as: METHOD + PATH + QUERY + BODY_HASH.
Body
Token generation request for Inline Checkout.
Notes Amount and currency are merchant-controlled for Inline Checkout. They are provided by the initiator backend when requesting the token and stored server-side keyed by the checkout nonce.
Response
Successful Response
Indicates whether the request was processed successfully.
true
A short, human-readable message describing the result of the request.
"Operation completed."
The main response payload, if applicable
Show child attributes
Show child attributes
The Unix timestamp (in seconds) indicating when the response was generated.
1718006400

