Api ReferenceFiablePay ApiCheckoutPut Checkout

Update Checkout

To update a checkout session, use the following endpoint:

  • Endpoint: PUT https://service-sandbox.fiablepay.com/v3/checkout/{id}
  • Description: Updates the details of a checkout session.

Authorization

You need to include the necessary authorization headers. Refer to the Authorization Guide.


Path Parameters

ParameterTypeRequiredDescription
idstringYesUnique checkout ID

Request Body

FieldTypeRequiredDescription
metadataobjectNoAdditional details to update
itemsarrayNoList of items in the invoice

Example Request Payload

{
    "metadata": {
        "order_id": "123456",
        "customer_notes": "Please deliver between 9 AM and 12 PM.",
        "additional_info": {
            "gift_wrap": true,
            "delivery_instructions": "Leave at the front door if no one answers."
        }
    },
    "items": [
        {
            "name": "T-shirt",
            "quantity": 1,
            "unit_price": 20
        },
        {
            "name": "Jeans",
            "quantity": 2,
            "unit_price": 50
        }
    ]
}

Response

StatusDescription
200Successfully updated the checkout session
{
    "status": "success",
    "message": "CHECKOUT.UPDATE.SUCCESS",
    "data": {
        "id": "chk_ctj2hirigj2jdsminhi0",
        "object": "checkout",
        "invoice_currency": "USD",
        "amount": 120,
        "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": "1 x T-shirt, 2 x Jeans",
        "expires_at": null,
        "created_at": "2024-12-21T02:32:43.650373780Z",
        "url": "https://checkout-sandbox.fiablepay.com/transaction/vXeBpzkOhVB2ncwIF0gAp80yQlO2FImyHbFRQJT6WBk=",
        "payment_status": "unpaid",
        "payment_status_description": "",
        "status": "active",
        "payin": "chk_ctj2hirigj2jdsminhi0",
        "payment_attempts": [],
        "latest_payment_attempt": "",
        "partially_paid": false,
        "paid_in_excess": false,
        "transaction_documents": [],
        "reference_id": "f29ebad9-e1f7-4ebd-8078-7d0a8c2f4caf",
        "metadata": {
            "order_id": "123456",
            "customer_notes": "Please deliver between 9 AM and 12 PM."
        }
    }
}