Supported workflows
Before you begin
Complete these steps before you send your first FawryPay payment through Fawry:- Get your merchant code and API key from Fawry.
- Set up a Fawry integration in your workspace with your merchant code and API key. Contact your Payrails account team if Fawry isn’t listed in your Payrails Portal yet.
- Choose whether Payrails sends its notification URL to Fawry on each payment. Turn on this account setting if you don’t configure the Payrails notification URL in your Fawry account.
- In the Payrails Portal, go to Settings → Integrations, open your Fawry integration, select Fawry Pay under Payment methods, and save.
- Add FawryPay as a payment option in your workflow.
Request fields for Fawry
Send these fields in the authorize request, in addition to the standard authorize fields. Payrails checks Required fields and returns an error when one is missing. Fields required by the PSP pass the Payrails checks but the PSP can decline the payment without them.Authorize a FawryPay payment
Call authorize a payment withfawryPay as the paymentMethodCode. The response includes the redirect to the Fawry page.
Authorize request
success or error URL. The payment is still pending at that point. Confirm the result through webhook notifications or the execution status before you fulfill the order.
How Fawry handles FawryPay
- The payment stays pending until the customer pays the reference. When the customer pays, Fawry notifies Payrails, and Payrails records the authorization and the capture together.
- If the customer leaves the Fawry page before generating a reference, the payment stays pending.
- To stop an unpaid reference, cancel the FawryPay payment. Send
meta.clientContext.languageon the cancel request too: Payrails returns an error without it. - Refunds use the Fawry reference of the paid payment. Fawry supports full and partial refunds.