Skip to main content
POST
/
checkout
/
{checkout_session_id}
/
confirm
Confirm checkout session and finalize purchase
curl --request POST \
  --url https://api.zenskar.com/checkout/{checkout_session_id}/confirm \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "confirmation": "charge_immediately",
  "customer_notes": "Please expedite activation of the services",
  "payment_description": "Annual subscription payment",
  "preferred_payment_method": "card",
  "redirect": true
}
'
{
  "payment_status": "not_started",
  "checkout_session_status": "completed",
  "estimates": {
    "estimation_id": "123e4567-e89b-12d3-a456-426614179999",
    "current_invoice": {
      "id": "123e4567-e89b-12d3-a456-426614179998",
      "invoice_number": "EST-0001",
      "status": "estimated",
      "customer": {
        "customer_id": "123e4567-e89b-12d3-a456-426614174001",
        "customer_name": "Acme Inc.",
        "email": "billing@acme.com"
      },
      "line_items": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174002",
          "name": "Basic Plan - Monthly Subscription",
          "quantity": 1,
          "unit_price": 29.99,
          "amount": 29.99,
          "currency": "USD",
          "description": "Core platform access with basic features",
          "period": {
            "start_date": "2023-01-01T00:00:00",
            "end_date": "2023-01-31T23:59:59"
          }
        },
        {
          "id": "123e4567-e89b-12d3-a456-426614174003",
          "name": "Additional Users",
          "quantity": 5,
          "unit_price": 10,
          "amount": 50,
          "currency": "USD",
          "description": "Additional user seats",
          "period": {
            "start_date": "2023-01-01T00:00:00",
            "end_date": "2023-01-31T23:59:59"
          }
        }
      ],
      "features": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174004",
          "name": "API Calls",
          "description": "Monthly API call allocation",
          "included_units": 10000,
          "used_units": 0
        }
      ],
      "subtotal": 79.99,
      "tax": 8,
      "total": 87.99,
      "due_date": "2023-01-01T00:00:00"
    },
    "future_invoices": [
      {
        "id": "123e4567-e89b-12d3-a456-426614175001",
        "invoice_number": "EST-0002",
        "status": "estimated",
        "customer": {
          "customer_id": "123e4567-e89b-12d3-a456-426614174001",
          "customer_name": "Acme Inc."
        },
        "line_items": [
          {
            "name": "Basic Plan - Monthly Subscription",
            "quantity": 1,
            "amount": 29.99,
            "period": {
              "start_date": "2023-02-01T00:00:00",
              "end_date": "2023-02-28T23:59:59"
            }
          },
          {
            "name": "Additional Users",
            "quantity": 5,
            "amount": 50,
            "period": {
              "start_date": "2023-02-01T00:00:00",
              "end_date": "2023-02-28T23:59:59"
            }
          }
        ],
        "subtotal": 79.99,
        "tax": 8,
        "total": 87.99,
        "due_date": "2023-02-01T00:00:00"
      },
      {
        "id": "123e4567-e89b-12d3-a456-426614175002",
        "invoice_number": "EST-0003",
        "status": "estimated",
        "subtotal": 79.99,
        "tax": 8,
        "total": 87.99,
        "due_date": "2023-03-01T00:00:00",
        "period": {
          "start_date": "2023-03-01T00:00:00",
          "end_date": "2023-03-31T23:59:59"
        }
      }
    ],
    "amount_due": 87.99,
    "credit_notes": []
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Path Parameters

checkout_session_id
string<uuid>
required

Body

application/json

Schema for confirming a checkout session

This schema defines the parameters for confirming a checkout session, including confirmation type, payment preferences, and redirect behavior.

confirmation
enum<string>

The confirmation mode that determines how payment will be handled

Available options:
charge_immediately,
charge_when_due,
no_payment
redirect
boolean

Whether to return a redirect response instead of a JSON response

preferred_payment_method
enum<string> | null

Preferred payment method type to use for this transaction

Available options:
card,
bank_transfer,
wallet,
invoice
payment_description
string | null

Optional description to include with the payment

Maximum string length: 255
customer_notes
string | null

Optional customer-provided notes for this checkout session

Maximum string length: 1000

Response

Checkout session successfully confirmed

payment_status
enum<string>
required
Available options:
not_started,
pending,
paid,
failed,
no_payment_required
checkout_session_status
enum<string>
required
Available options:
open,
processing,
completed,
closed,
cancelled
contract
ContractResponseSchema · object
checkout_session_redirect_url
string | null
estimates
EstimationResponseSchema · object

Final estimation response returned by the estimates API.