openapi: 3.0.3 info: title: FawryPay Server Installments Payments API version: '1.0' description: 'Server-to-server REST API for FawryPay, the e-payment platform operated by Fawry (Egypt). Supports card payments (incl. 3DS), e-wallet payments, payment requests using a FawryPay reference number, refunds, payment status queries, and cancellation of unpaid orders. Authentication is via a per-merchant `merchantCode` plus a SHA-256 signature computed from the request body and a shared `secureKey`. ' contact: name: FawryPay Developer Support url: https://developer.fawrystaging.com/contact-us license: name: Proprietary url: https://fawry.com/ servers: - url: https://atfawry.fawrystaging.com description: Staging - url: https://www.atfawry.com description: Production tags: - name: Payments description: Create payment requests and charge cards or wallets. paths: /ECommerceWeb/Fawry/payments/charge: post: operationId: createCharge tags: - Payments summary: Create a Charge description: 'Create a payment request. Used both for card / e-wallet payments and for generating a FawryPay reference number that the customer can pay at a Fawry retail POS, ATM, or banking channel. The `paymentMethod` field selects the channel (e.g. `PayAtFawry`, `CARD`, `MWALLET`). ' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChargeRequest' responses: '200': description: Charge accepted. content: application/json: schema: $ref: '#/components/schemas/ChargeResponse' '400': description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: code: type: string description: type: string reason: type: string ChargeResponse: type: object properties: type: type: string example: ChargeResponse referenceNumber: type: string merchantRefNumber: type: string orderAmount: type: number format: float paymentAmount: type: number format: float fawryFees: type: number format: float paymentMethod: type: string orderStatus: type: string paymentTime: type: integer format: int64 customerMobile: type: string customerMail: type: string customerProfileId: type: string signature: type: string statusCode: type: integer statusDescription: type: string ChargeItem: type: object required: - itemId - description - price - quantity properties: itemId: type: string description: type: string price: type: number format: float quantity: type: number format: float ChargeRequest: type: object required: - merchantCode - merchantRefNum - paymentMethod - customerMobile - customerEmail - amount - description - language - chargeItems - signature properties: merchantCode: type: string description: Merchant code issued by Fawry during onboarding. merchantRefNum: type: string description: Unique merchant-side reference for this order. customerProfileId: type: string description: Optional customer profile identifier on the merchant side. paymentMethod: type: string description: Payment channel. enum: - PayAtFawry - CARD - MWALLET - VALU - CASH_ON_DELIVERY customerName: type: string customerMobile: type: string customerEmail: type: string format: email amount: type: number format: float currencyCode: type: string default: EGP paymentExpiry: type: integer format: int64 description: Payment expiry as epoch milliseconds. description: type: string language: type: string enum: - ar-eg - en-gb chargeItems: type: array items: $ref: '#/components/schemas/ChargeItem' orderWebHookUrl: type: string format: uri signature: type: string description: SHA-256 of `merchantCode + merchantRefNum + customerProfileId + paymentMethod + amount(2dp) + secureKey`.