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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
number
required
Defaults to 10

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

integer

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

string

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

string

Your customer name that should be displayed during the checkout.

string

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

string

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.

string
enum

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

string

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

string

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}((#)|())$

string

Customer email address.

string
enum

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

Allowed:
string

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

string

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

string

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

CustomerAddress
object
date-time

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

InvoiceItems
array of objects

Array of invoice items. Note: The InvoiceValue should equal the total sum of (UnitPrice * Quantity) for all items.

InvoiceItems
integer
enum

1: for DHL, 2: for ARAMEX.

Allowed:
ShippingConsignee
object

Mandatory if you are creating a Shipping invoice.

Suppliers
array of objects

Mandatory only if you are using the Multi-Vendors feature.

Suppliers
RecurringModel
object

Configuration for recurring payments.

ProcessingDetails
object

Used for Non3DS and AutoCapture features.

string

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

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json