Checkout API
Authorization
-
To access this endpoint, you must authenticate your requests. Please refer to the Authorization Page for detailed instructions on how to authorize your API calls.
-
You must also send the Idempotency-Key in the headers to access the endpoint. Please refer to the Idempotent Page for detailed instructions on how to authorize your api calls.
Endpoint
- URL:
https://api.fiablepay.com/v1/checkout
- Method:
POST
Request Body
Below is the JSON payload expected by the Checkout
API. Fields are categorized and clearly marked as required or optional.
JSON Payload
{
"amount": 100, // Required
"invoice_currency": "USD", // Required
"customer_details": { // Required
"country": "US", // Required
"email": "john.doe@example.com", // Required
"name": "John Doe", // Required
"phone": { // Required
"calling_code": "+1", // Required
"number": "1234567890" // Required
}
},
"transaction_description": "1 x T-shirt", // Required
"reference_id": "f29ebad9-e1f7-4ebd-8078-7d0a8c2f4caf", // Required
"cancel_url": "https://example.com/cancel", // Optional
"success_url": "https://example.com/success", // Optional
"webhook_url": "https://example.com/webhook", // Optional
"transaction_documents": [], // Optional
"confirm": true, // Required
"payment_method_details": { // Optional
"family": "card", // Required
"group": "visa", // Optional
"type": "credit", // Optional
"name": "Visa", // Optional
"logo_url": ["https://example.com/visa-logo.png"], // Optional
"experience_type": "redirect", // Optional
"notification_type": "email", // Optional
"transaction_fee": 0, // Optional
"banks": [], // Optional
"currency": "USD", // Required
"exchange_rate": 1, // Required
"amount": 100 // Required
}
"items": [ // Optional
{
"name": "T-shirt", // Required
"quantity": 2, // Required
"amount": 50, // Required
"description": "A comfortable cotton T-shirt" // Optional
}
]
}
JSON Response
{
"success": true,
"message": "CHECKOUT.CREATE.SUCCESS",
"data": {
"amount": 100,
"amount_paid": 0,
"billing_details": null,
"cancel_url": "https://example.com/cancel",
"created_at": "2024-12-21T02:32:43.650373780Z",
"customer": "cus_ctgp0rq2lprdpl0d6upg",
"customer_details": {
"country": "US",
"email": "john.doe@example.com",
"name": "John Doe",
"phone": {
"calling_code": "+1",
"number": "1234567890"
}
},
"customer_fee_percentage": 0,
"expires_at": null,
"holding_currency": "USD",
"id": "chk_ctj2hirigj2jdsminhi0",
"invoice_currency": "USD",
"items": [],
"latest_payment_attempt": "",
"metadata": null,
"object": "checkout",
"paid_in_excess": false,
"partially_paid": false,
"payin": "chk_ctj2hirigj2jdsminhi0",
"payment_attempts": [],
"payment_methods": [
"card"
],
"payment_status": "unpaid",
"payment_status_description": "",
"reference_id": "f29ebad9-e1f7-4ebd-8078-7d0a8c2f4caf",
"remove_payment_methods": [],
"shipping_details": null,
"statement_descriptor": "Fiable Pay Checkout",
"status": "active",
"success_url": "https://example.com/success",
"token": "vXeBpzkOhVB2ncwIF0gAp80yQlO2FImyHbFRQJT6WBk=",
"transaction_data": [],
"transaction_description": "1 x T-shirt",
"transaction_documents": [],
"url": "https://checkout-sandbox.fiablepay.com/transaction/vXeBpzkOhVB2ncwIF0gAp80yQlO2FImyHbFRQJT6WBk=",
"webhook_url": "https://example.com/webhook/"
}
}