POST
/
v1
/
checkouts
curl --request POST \
  --url https://api.stan-app.fr/v1/checkouts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "return_url": "<string>",
  "total_amount": 123,
  "session_id": "<string>",
  "order_id": "<string>",
  "subtotal_amount": 123,
  "discount_amount": 123,
  "tax_rate": 123,
  "tax_cost": 123,
  "discount_code": "<string>",
  "line_items": [
    {
      "product_id": "<string>",
      "quantity": 123,
      "unit_price": 123,
      "discount_amount": 123,
      "description": "<string>",
      "sku": "<string>",
      "image_url": "<string>",
      "product_url": "<string>"
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "total_amount": 123,
  "total_amount_before_discount": 123,
  "subtotal_amount": 123,
  "discount_amount": 123,
  "tax_rate": 123,
  "discount_code": "<string>",
  "is_testmode": true,
  "line_items": [
    {
      "product_id": "<string>",
      "quantity": 123,
      "unit_price": 123,
      "discount_amount": 123,
      "description": "<string>",
      "sku": "<string>",
      "image_url": "<string>",
      "product_url": "<string>"
    }
  ],
  "merchant": {
    "name": "<string>",
    "website": "<string>",
    "privacy_policy_url": "<string>",
    "general_terms_url": "<string>",
    "logo_url": "<string>"
  },
  "session_id": "<string>",
  "order_id": "<string>"
}

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
return_url
string

It's where the user will be redirected at the end of the checkout, whether it's success, cancelled or failed

total_amount
integer

Defines the total cost of the checkout (subtotal + shipping + tax)

session_id
string

An ID for the checkout session, it can be the cart ID or anything else

order_id
string

The ID of the current order if created

subtotal_amount
integer

Defines the total cost of the checkout before taxes and without discounts

discount_amount
integer

Defines the absolute discount amount

tax_rate
integer

Defines the percent of taxes (express as integer)

tax_cost
integer
discount_code
string

Defines the code used for the discount

line_items
object[]

Response

200 - application/json
id
string
total_amount
integer

Total amount to pay

total_amount_before_discount
integer

Total amount to pay before any discount

subtotal_amount
integer

Subtotal amount of this checkout

discount_amount
integer

Total discount applied to this checkout

tax_rate
integer

Tax rate

discount_code
string

Discount code applied to this checkout

is_testmode
boolean

Wether the checkout is in testmode or not

line_items
object[]

Items included in the checkout

merchant
object
session_id
string

Defines a session for the current user

order_id
string

Order id associated to this checkout