POST/checkout/create.php
Terminal
curl "https://circus-pay.com/api/checkout/create.php" \
  -H "Authorization: Bearer $CIRCUSPAY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "amount": 2499,
  "currency": "EUR",
  "productName": "Ma commande",
  "orderId": "ORDER-DEMO-001",
  "successUrl": "https://example.com/payment/return",
  "cancelUrl": "https://example.com/payment/cancel"
}'

Parameters

ParameterDescription
amount · integer · requiredPositive amount in minor units. Example: 15000 for PLN 150.
currency · stringCurrency, default EUR. Availability depends on the account and configured processing.
orderId · stringYour order reference. Reusing it may return the existing link; do not use it for a new order.
productName · stringLabel shown to the customer.
customerEmail / customerNameOptional details to prefill the checkout.
paymentMethods · string[]Restricts offered methods. Does not enable a method unavailable to your account.
theme_id · stringID of an active theme belonging to your account. See Checkout Studio.
successUrl / cancelUrlReturn addresses for your store. Payment confirmation happens server-side.
testMode · booleanEnables the test flow. A test key also forces this mode.

Response

Illustrative excerpt · fictional domain
{
  "success": true,
  "token": "pay_EXAMPLE",
  "url": "https://checkout.example.com/checkout/pay_EXAMPLE",
  "orderId": "ORDER-DEMO-001",
  "test": false,
  "mode": "live"
}

The response may also include fallbackUrl, routing, ghostSite and theme_id. Use url as the destination and retain your order reference.

Retry without duplicating

For a non-reusable link and an existing reference, the API may return reused: true and alreadyPaid. Check these fields and the status before restarting payment. This is not a general idempotency guarantee across all endpoints.