Expire Checkout
To expire a checkout session, use the following endpoint:
- Endpoint:
POST https://service-sandbox.fiablepay.com/v3/checkout/{id}/expire
- Description: This API allows you to mark a checkout session as expired.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | string | Yes | The unique ID of the checkout session to expire |
Response
Field | Type | Description |
---|---|---|
id | string | Unique ID of the checkout session |
invoice_currency | string | Currency of the invoice |
amount | integer | Total amount for the checkout (default: 0) |
amount_paid | integer | Amount already paid (default: 0) |
customer_details | object | Customer information |
success_url | string | URL to redirect to after successful payment |
cancel_url | string | URL to redirect to if payment is canceled |
webhook_url | string | Webhook URL for payment updates |
payment_methods | array of strings | Supported payment methods |
transaction_description | string | Description of the transaction |
expires_at | string | Timestamp of when the session expired |
status | string | Current status of the checkout session |
payment_status | string | Payment status (e.g., unpaid, expired) |
url | string | URL for the checkout session |
Example Response
{
"status": "success",
"message": "CHECKOUT.EXPIRE.SUCCESS",
"data": {
"id": "chk_ctj2hirigj2jdsminhi0",
"invoice_currency": "USD",
"amount": 100,
"amount_paid": 0,
"customer_details": {
"customer": "cus_ctgp0rq2lprdpl0d6upg",
"billing_details": null,
"shipping_details": null
},
"success_url": "https://example.com/success",
"cancel_url": "https://example.com/cancel",
"webhook_url": "https://example.com/webhook",
"payment_methods": ["card"],
"transaction_description": "Order #12345",
"expires_at": "2024-12-21T10:00:00Z",
"status": "expired",
"payment_status": "unpaid",
"url": "https://checkout-sandbox.fiablepay.com/transaction/vXeBpzkOhVB2ncwIF0gAp80yQlO2FImyHbFRQJT6WBk="
}
}