Skip to main content
POST
You set the amount; the buyer cannot change it. Redirect them to checkout_url exactly as returned. Only the card_checkout.order.paid webhook means the buyer paid. The checkout link expires after 60 minutes. platform_fee, reserve and net_amount are fixed when the order is created. See Create an order.

Authorizations

X-Api-Key
string
header
required

Your API key (yativo_pk_...) from Developers → API Keys. Send together with X-Api-Secret.

X-Api-Secret
string
header
required

Your API secret (yativo_sk_...), shown once when the key is created.

Headers

Idempotency-Key
string
required

A unique string per request to ensure idempotent processing.

Body

application/json
customer_id
string
required

The customer that is selling. Its card_checkout endorsement must be approved.

Example:

"4f0c1e1a-8d2b-4c7e-9b1a-3e5f6a7b8c9d"

amount
string
required

Amount to charge, as a decimal string in major units.

Example:

"49.99"

currency
string
required
Required string length: 3
Example:

"USD"

description
string
required

What the buyer is paying for. Shown on the checkout page.

Required string length: 2 - 255
Example:

"Pro plan, 1 month"

reference
string

Your own order ID. Unique per account. Letters, digits and ._:-/.

Maximum string length: 100
Example:

"INV-10023"

customer_email
string<email>

The buyer's email. Prefills the checkout form.

Example:

"ada@example.com"

customer_name
string

The buyer's name. Prefills the checkout form.

Maximum string length: 120
success_url
string<uri>

HTTPS link shown after a successful payment.

Example:

"https://shop.example.com/thanks"

cancel_url
string<uri>

HTTPS Return to seller link on the checkout page.

Example:

"https://shop.example.com/cart"

metadata
object

Up to 20 string values, returned on the order and in webhooks.

payment_methods
string[]

Limit this checkout to some of the methods from GET /card-checkout/account. Leave it out to offer every enabled method.

Required array length: 1 - 100 elements
Example:

Response

Checkout created

status
string
Example:

"success"

status_code
integer
Example:

201

message
string
Example:

"Checkout created"

data
object