v1

latestOpenAPI 3.0.02026-07-24440173.4 KB
Payments (V2)

ExecutePayment

Creates a MyFatoorah invoice against a certain gateway. This endpoint processes the payment with a specific payment method and returns the payment URL where the customer should be redirected to complete the payment.

post/v2/ExecutePayment

Request body

InvoiceValuenumber required

The amount you are seeking to charge the customer and accepts decimal values (e.g., 2.500).

PaymentMethodIdinteger

The payment method ID (e.g., 2 for VISA/MASTER). Required if SessionId is not provided. You can get this from InitiatePayment endpoint.

SessionIdstring

Session ID used for Embedded Payment integration. Required if PaymentMethodId is not provided. Note: Only one of PaymentMethodId and SessionId is required.

CustomerNamestring

Your customer name that should be displayed during the checkout.

CallBackUrlstring

The return URL in case of a successful payment. The localhost is not allowed to be set as a domain. Maximum 254 characters.

ErrorUrlstring

The return URL in case of a failed payment or any exception raised during the payment. The localhost is not allowed to be set as a domain. Maximum 254 characters.

DisplayCurrencyIso'KWD' | 'SAR' | 'BHD' | 'AED' | 'QAR' | 'OMR' | 'JOD' | 'EGP'

The currency ISO code you want to display to the customer, by default is the same as the base currency of the country API.

MobileCountryCodestring

Customer mobile number country code (e.g., +965 for Kuwait).

CustomerMobilestring

Customer mobile number. String uses English letters ONLY and does not accept Arabic characters. Its length is between 0 and 11. Pattern: ^(?:(+)|(00)|(*)|())[0-9]{3,14}((#)|())$

CustomerEmailstring

Customer email address.

Language'EN' | 'AR'

EN: to display the checkout page in English. AR: to display the checkout page in Arabic.

CustomerReferencestring

Refers to the order or transaction ID in your own system and you can use it for payment inquiry as well.

CustomerCivilIdstring

Your customer civil ID that you can associate with the transaction if needed.

UserDefinedFieldstring

A custom field that you may use as additional information to be stored with the transaction. Maximum length is 500.

ExpiryDatestring date-time

The date you want the payment to expire. If not passed, the default is considered from the account profile in the portal.

ShippingMethod1 | 2

1: for DHL, 2: for ARAMEX.

WebhookUrlstring

You will get the webhook events for the created invoice on the specified Webhook URL. This includes transactions webhook, refunds webhook, capture/release webhook. The secret key for this URL will be the same as your webhook URL used in the dashboard. If you don't add this parameter, MyFatoorah sends the webhook event to the one configured in the dashboard.

Response

Payment executed successfully

IsSuccessboolean

Indicates if the request was successful.

Messagestring

Response message associated with the request.