Time Based Checkout
This section walk you through how to use the time based hosted checkout.
Ensure you have fulfilled the steps in the previous section before proceeding
Airgate allows you to set a time limit for your hosted payment checkout. This ensures that a payment session automatically expires if the user does not complete the transaction within a specified time window. Below is how you can implement this feature
Add the
time_outfield to the Payment Initiation Request When sending a payment initiation request to the/payment_initiate_hostedendpoint, make sure to include thetime_outfield in your payload. If you're unfamiliar with how to initiate a payment, please refer to the previous section for detailed instructions. By adding thetime_outfield, your final request payload should look like this{ "amount": <AMOUNT>, "user": { "name": <CUSTOMER_NAME>, "phone": <CUSTOMER_PHONE>, "email": <CUSTOMER_EMAIL> }, "callback_url": <YOUR_CALLBACK_URL>, "customer_transaction_ref": <YOUR_UNIQUE_REFERENCE>,// optional "time_out": <YOUR_TIME_OUT> // integer (represented in minute) }
time_out Field Specifications
Type: Integer
Unit: Minutes
Description: The number of minutes after which the checkout will expire automatically if not completed.
Examples:
time_out: 1– Expires after 1 minute.time_out: 15– Expires after 15 minutes.
Handling Timeout Redirection Once the specified
time_outduration elapses without the payment process reaching a completed state, Airgate will automatically redirect the customer back to yourcallback_url. The URL will include a query parameter indicating the status of the transaction astimeout. You can then handle the rest of your business logic accordingly. Refer to this section to view the complete list of statuses that may be returned as query parameters to your callback URL.
Last updated