curl --request POST \
  --url https://api.dots.dev/api/v2/checkout-sessions \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cancel_url": "<string>",
  "client_reference_id": "<string>",
  "customer_email": "jsmith@example.com",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expires_in": 123,
  "line_items": [
    {
      "price_data": {
        "amount": 123,
        "currency": "usd",
        "product_data": {
          "description": "<string>",
          "images": [
            "<string>"
          ],
          "metadata": {},
          "name": "<string>"
        }
      },
      "quantity": 123
    }
  ],
  "metadata": {},
  "mode": "payment",
  "success_url": "<string>",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "amount_total": 123,
  "cancel_url": "<string>",
  "checkout_session_url": "<string>",
  "client_reference_id": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "customer_email": "jsmith@example.com",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiry": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "line_items": [
    {
      "price_id": "<string>",
      "quantity": 123
    }
  ],
  "metadata": {},
  "payment_intent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "open",
  "success_url": "<string>",
  "updated": "2023-11-07T05:31:56Z"
}

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
cancel_url
string
client_reference_id
string
customer_email
string
customer_id
string
expires_in
integer
default: 10800
line_items
object[]
required
metadata
object
mode
enum<string>
required
Available options:
payment
success_url
string
required
user_id
string

Supply a Dots user ID in place of a customer ID

Response

200 - application/json
amount_total
integer
cancel_url
string
checkout_session_url
string
client_reference_id
string
created
string
customer_email
string
customer_id
string

payment-customer ID

expiry
string
id
string
line_items
object[]
metadata
object
payment_intent_id
string
status
enum<string>
Available options:
open,
complete,
expired
success_url
string
updated
string