v1

latestOpenAPI 3.0.02026-07-24440173.4 KB
Payments (V2)

SendPayment

Creates a MyFatoorah invoice. This endpoint generates an invoice link that can be sent to customers via email, SMS, or returned directly in the response.

post/v2/SendPayment

Request body

CustomerNamestring required

Your customer name that will be displayed during the checkout.

InvoiceValuenumber required

The amount you are seeking to charge the customer and accepts decimal values. Must be greater than 0.

NotificationOption'EML' | 'SMS' | 'LNK' | 'ALL' required

EML: sends the invoice link by email only (requires CustomerEmail). SMS: sends the invoice link by SMS (requires CustomerMobile). LNK: returns the invoice link through the response body only. ALL: sends the invoice link by Email and SMS, also returns the invoice link through the response body.

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

The currency ISO code you want to display to the customer, by default it is the same as the base currency of the country API. Possible values: KWD, SAR, BHD, AED, QAR, OMR, JOD, EGP.

MobileCountryCodestring

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

CustomerMobilestring

Customer mobile number. Mandatory if NotificationOption is SMS or ALL. 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 that will get the invoice URL. Mandatory if NotificationOption is EML or ALL.

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 that you can link with the invoice generated for reporting purposes.

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. If using save card characters 'CK-', max length is 50 chars. Otherwise, maximum length is 500.

CallBackUrlstring

The return URL you like to have for 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. Maximum 254 characters.

ExpiryDatestring date-time

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

ShippingMethod1 | 2

1: for DHL, 2: for ARAMEX.

InvoicePaymentMethodsinteger[]

Enter the PaymentMethodId for the payment methods you want to display on the invoice. You can find the PaymentMethodId from InitiatePayment endpoint.

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

Invoice created successfully

IsSuccessboolean

Indicates if the request was successful.

Messagestring

Response message associated with the request.