Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.caibo.digital/llms.txt

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

Overview

Before initializing the checkout SDK, you must create a payment request via the API and obtain its id. The merchantId and requestId are required parameters in the paymentUrl passed to CaiboCheckout.init().
This call is made from your backend so your X-API-KEY is never exposed to the browser. The returned payment request id is the value you’ll use as requestId in the SDK.

Endpoint

POST {api_base}/payment-requests?send=null
Header: X-API-KEY: <your-merchant-api-key>
Content-Type: application/json

Sample Request Body

{
  "amount": 49.99,
  "unit": "EUR",
  "referenceId": "ORDER-12345",
  "notifyUrl": "https://merchant.example.com/ipg/webhook",
  "successUrl": "https://merchant.example.com/thank-you",
  "failureUrl": "https://merchant.example.com/payment-failed",
  "originDomain": "shop.example.com",
  "client": {
    "name": "Jane Doe",
    "email": "jane@example.com",
    "address": "123 Main St",
    "phone": "+15551234567",
    "memberId": "CUST-001"
  }
}

Field Reference

FieldTypeRequiredDescription
amountnumberYesTotal amount to charge.
unitstringYesISO 4217 currency code (e.g. EUR, USD).
referenceIdstringNoYour internal order identifier; echoed back on webhooks.
notifyUrlstringNoServer-to-server webhook URL for status updates.
successUrlstringNoURL the SDK delivers in the payment.success event payload.
failureUrlstringNoURL the SDK delivers in the payment.failure event payload.
originDomainstringNoOrigin allow-list entry that must match the page hosting the SDK iframe.
clientobjectNoOptional customer details prefilled into the checkout UI.

Use the Response

The response includes the payment request id. Pass that value as requestId when constructing the paymentUrl for CaiboCheckout.init():
https://pay.caibo.digital/main?merchantId=MERCHANT_ID&requestId=REQUEST_ID&apiKey=API_KEY
Replace MERCHANT_ID, REQUEST_ID, and API_KEY with the actual values from your merchant account and the payment request creation API response.

Next Steps