POST
/
v1
/
checkouts
curl --request POST \
  --url https://api.creem.io/v1/checkouts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "request_id": "<string>",
  "product_id": "prod_1234567890",
  "units": 1,
  "discount_code": "SUMMER2024",
  "customer": {
    "id": "cust_1234567890",
    "email": "user@example.com"
  },
  "custom_field": [
    {
      "type": "text",
      "key": "<string>",
      "label": "<string>",
      "optional": true,
      "text": {
        "max_length": 123,
        "min_length": 123
      }
    }
  ],
  "success_url": "<string>",
  "metadata": {
    "userId": "user_123",
    "visitCount": 42,
    "lastVisit": "2023-04-01"
  }
}'
{
  "id": "<string>",
  "mode": "test",
  "object": "<string>",
  "status": "<string>",
  "request_id": "<string>",
  "product": "<string>",
  "units": 1,
  "order": {
    "id": "<string>",
    "mode": "test",
    "object": "<string>",
    "customer": "<string>",
    "product": "<string>",
    "transaction": "tx_1234567890",
    "discount": "dis_1234567890",
    "amount": 2000,
    "sub_total": 1800,
    "tax_amount": 200,
    "discount_amount": 100,
    "amount_due": 1900,
    "amount_paid": 1900,
    "currency": "EUR",
    "fx_amount": 15,
    "fx_currency": "EUR",
    "fx_rate": 1.2,
    "status": "pending",
    "type": "recurring",
    "affiliate": "<string>",
    "created_at": "2023-09-13T00:00:00Z",
    "updated_at": "2023-09-13T00:00:00Z"
  },
  "subscription": "<string>",
  "customer": "<string>",
  "custom_fields": [
    {
      "type": "<string>",
      "key": "<string>",
      "label": "<string>",
      "optional": true,
      "text": {
        "max_length": 123,
        "min_length": 123
      }
    }
  ],
  "checkout_url": "<string>",
  "success_url": "https://example.com/return",
  "feature": [
    {
      "license": {
        "id": "<string>",
        "mode": "test",
        "object": "<string>",
        "status": "active",
        "key": "ABC123-XYZ456-XYZ456-XYZ456",
        "activation": 5,
        "activation_limit": 1,
        "expires_at": "2023-09-13T00:00:00Z",
        "created_at": "2023-09-13T00:00:00Z",
        "instance": {
          "id": "<string>",
          "mode": "test",
          "object": "license-instance",
          "name": "My Customer License Instance",
          "status": "active",
          "created_at": "2023-09-13T00:00:00Z"
        }
      }
    }
  ],
  "metadata": {
    "userId": "user_123",
    "visitCount": 42,
    "lastVisit": "2023-04-01"
  }
}

Headers

x-api-key
string
required

Body

application/json
Create checkout request payload

The body is of type object.

Response

200 - application/json
Successfully created a checkout session

The response is of type object.