Skip to main content
When you initiate a payment, Archefusion returns the checkout details inside recommendedGateway.session. This is the object you read to send your customer to the gateway’s checkout page.

Reading the session

For redirect-based gateways (Paystack, Flutterwave, Monnify, Korapay), the session object shares these common fields:
  • gateway: the gateway that produced the session
  • reference: the gateway’s transaction reference
  • redirectUrl: the checkout URL to send the customer to
  • raw: the raw response data from the underlying gateway
What to do with the response:
  1. Send the customer to recommendedGateway.session.redirectUrl to complete checkout. This works for Paystack, Flutterwave, Monnify, and Korapay.
  2. Store paymentId. You will need it to check status or verify the payment through Archefusion’s APIs.
Interswitch is the exception. Its redirectUrl is a POST form action, not a link you redirect the customer to. Submit session.formFields to session.redirectUrl as a POST request using session.method. Redirecting a customer to it with a plain GET will fail.

Gateway session examples

The session object varies by gateway. Expand each gateway below to see the shape of its session object. The raw field is trimmed here for brevity.
Redirect the customer to redirectUrl to complete checkout.
Redirect the customer to redirectUrl to complete checkout.
Redirect the customer to redirectUrl to complete checkout.
Monnify’s checkout URL contains pipe (|) characters. Browsers accept these directly, so you can use redirectUrl as-is. If your HTTP stack requires strictly valid URLs, encode the pipes as %7C.
Redirect the customer to redirectUrl to complete checkout.
Interswitch does not follow the redirect pattern. Its redirectUrl is a POST form action. Submit the fields in formFields to redirectUrl as a POST request using method, rather than sending the customer there with a plain GET redirect.