---
title: "ExecutePayment"
method: POST
path: "/v2/ExecutePayment"
tags: ["Payments (V2)"]
---

# ExecutePayment

`POST /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.

## Request body

- object
  - `InvoiceValue` number, required — The amount you are seeking to charge the customer and accepts decimal values (e.g., 2.500).
  - `PaymentMethodId` integer — The payment method ID (e.g., 2 for VISA/MASTER). Required if SessionId is not provided. You can get this from InitiatePayment endpoint.
  - `SessionId` string — Session ID used for Embedded Payment integration. Required if PaymentMethodId is not provided. Note: Only one of PaymentMethodId and SessionId is required.
  - `CustomerName` string — Your customer name that should be displayed during the checkout.
  - `CallBackUrl` string — The return URL in case of a successful payment. The localhost is not allowed to be set as a domain. Maximum 254 characters.
  - `ErrorUrl` 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.
  - `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.
  - `MobileCountryCode` string — Customer mobile number country code (e.g., +965 for Kuwait).
  - `CustomerMobile` 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}((#)|())$
  - `CustomerEmail` string — Customer email address.
  - `Language` 'EN' | 'AR' — EN: to display the checkout page in English. AR: to display the checkout page in Arabic.
  - `CustomerReference` string — Refers to the order or transaction ID in your own system and you can use it for payment inquiry as well.
  - `CustomerCivilId` string — Your customer civil ID that you can associate with the transaction if needed.
  - `UserDefinedField` string — A custom field that you may use as additional information to be stored with the transaction. Maximum length is 500.
  - `CustomerAddress` object
    - `Block` string — Block number or area name that contains the delivery address.
    - `Street` string — Delivery address street name.
    - `HouseBuildingNo` string — House / Building number.
    - `Address` string — Full address details.
    - `AddressInstructions` string — Additional instructions for the delivery address, landmark or directions.
  - `ExpiryDate` string, 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` object[] — Array of invoice items. Note: The InvoiceValue should equal the total sum of (UnitPrice * Quantity) for all items.
    - `ItemName` string, required — Invoice item name that will be displayed in the invoice.
    - `Quantity` integer, required — Item quantity.
    - `UnitPrice` number, required — Item unit price.
    - `Weight` number — Weight in kg. Must be between 0 and 100.
    - `Width` number — Width in cm. Must be between 0 and 200.
    - `Height` number — Height in cm. Must be between 0 and 160.
    - `Depth` number — Depth in cm. Must be between 0 and 200.
  - `ShippingMethod` 1 | 2 — 1: for DHL, 2: for ARAMEX.
  - `ShippingConsignee` object — Mandatory if you are creating a Shipping invoice.
    - `PersonName` string, required — Consignee person name.
    - `Mobile` string, required — Consignee mobile number.
    - `EmailAddress` string — Consignee email address.
    - `LineAddress` string, required — Consignee line address.
    - `CityName` string, required — Consignee city name.
    - `PostalCode` string — Consignee postal code.
    - `CountryCode` string, required — Consignee country code.
  - `Suppliers` object[] — Mandatory only if you are using the Multi-Vendors feature.
    - `SupplierCode` integer, required — The supplier code you need to associate the invoice with.
    - `ProposedShare` number — The amount that the supplier will get after paying the invoice.( net value you need to be deposited to the supplier without any fees or commissions, this will override the InvoiceShare if both are sent )
    - `InvoiceShare` number, required — Amount specified for this supplier from the total invoice value.
  - `RecurringModel` object — Configuration for recurring payments.
    - `RecurringType` 'Custom' | 'Daily' | 'Weekly' | 'Monthly' — Defines the interval time of charging the customer again with the same amount. Possible values: Custom, Daily, Weekly, Monthly.
    - `IntervalDays` integer — Valid for 'Custom' RecurringType. Must be between 1 and 180 days.
    - `Iteration` integer — Determines how many times you will charge the customer for your services.
    - `RetryCount` integer — Optional parameter. Accepts integer values between 1 and 5. Used in case of any failure recurring, to retry paying the same failed invoice till it paid or the count reset to zero.
  - `ProcessingDetails` object — Used for Non3DS and AutoCapture features.
    - `AutoCapture` boolean — true: To make the capture process directly without authorization. false: To make the authorization step first, then call UpdatePaymentStatus to capture/release the amount. Note: The Authorization & Capture feature must be enabled on your account to use this.
    - `Bypass3DS` boolean — true: To bypass 3DS challenge. false: To redirect the customer to the 3DS challenge. Note: The Bypass3DS feature must be enabled on your account to use this.
  - `WebhookUrl` 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 `200`

Payment executed successfully

- object
  - `IsSuccess` boolean — Indicates if the request was successful.
  - `Message` string — Response message associated with the request.
  - `ValidationErrors` object[] — List of validation errors, if any.
    - `Name` string — The name of the field with validation error.
    - `Error` string — The validation error message.
  - `Data` object
    - `InvoiceId` integer — The invoice number that you can use to inquire about the invoice payment status later.
    - `IsDirectPayment` boolean — Indicates if this URL is for Direct Payment method.
    - `PaymentURL` string — The URL that you should redirect the customer to OR submit the card details to process the payment.
    - `CustomerReference` string — Refers to the order or transaction ID in your system that you have sent in the request.
    - `UserDefinedField` string — The custom field that you have passed in the request.
    - `RecurringId` string — If you set the RecurringModel, the system will return the RecurringId value.

---

[API](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3.md) · [All operations](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myfatoorah/myfatoorah-api-v3/revisions/994a74287a16/schema)
