---
title: "Create Payment"
method: POST
path: "/v3/payments"
tags: ["Payments"]
---

# Create Payment

`POST /v3/payments`

## Request body

- object
  - `PaymentMethod` 'CARD' | 'APPLE_PAY' | 'GOOGLE_PAY' | 'KNET' — Specify the payment method you want to use, or omit this parameter to create a payment page that displays all enabled methods. This is required for redirection cases.
  - `Order` object, required — Order information related to the payment..
    - `Amount` number, required — The payment amount must be greater than 0.
    - `Currency` 'SAR' | 'BHD' | 'AED' | 'QAR' | 'OMR' | 'KWD' | '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.
    - `ExternalIdentifier` string — You may use as additional information to be stored with the transaction.
  - `SourceOfFund` object — Contains the payment source details (Tokenized card, direct card details, or Session Id)
    - `SessionId` string — Session ID returned from initiating the session, used for Embedded Integration with COLLECT_DETAILS mode
    - `Token` string — Token for saved cards when processing payments without entering card data again, or for Wallet tokens.
    - `Type` string
    - `Card` object — Used only if you are PCI-certified and processing card details through direct integration.
      - `Number` string — Represents the 16 digits of the card that will be charged for the transaction
      - `ExpiryMonth` string — Card expiry month
      - `ExpiryYear` string — Card expiry year
      - `SecurityCode` string — Card CVV / CVC
      - `HolderName` string — Name on the card.
      - `Cryptogram` string — Cryptogram value used for 3DSecure payments and wallet payments.
      - `EciIndicator` string — 3DSecure ECI value from the card issuer.
  - `PaymentExpiry` string, date-time — The payment expiration date. Must be in UTC timezone.
  - `SaveCardOptions` object — Used to tokenize card details when using direct integration.
    - `SaveToken` boolean — If true, card tokenization will be enabled for future transactions.
  - `ThreeDS` object — 3D Secure authentication details for the direct card transaction.
    - `Enabled` boolean — If true, the user will be required to complete the OTP step.
    - `AuthenticationValue` string — Cryptogram
    - `DirectoryServerTransactionId` string
    - `Eci` string
    - `ProtocolVersion` string
    - `TransactionStatus` string
  - `NotificationOption` 'EMAIL' | 'SMS' | 'ALL' | 'LINK' — Defines how the customer receives invoice notifications. Note: Email or mobile becomes mandatory based on the selected option.
  - `OperationType` 'AUTHORIZE' | 'PAY' — Defines the type of payment operation.
  - `Suppliers` object[] — Required only if Multi-Vendor feature is enabled.
    - `SupplierCode` integer — The supplier code you need to associate the invoice with.
    - `ProposedDepositShare` number — The amount that the supplier will get after paying the invoice.
    - `InvoiceShare` number — Amount specified for this supplier from the total invoice value.
  - `Customer` object — Customer information that will be returned back to you in webhook events.
    - `Name` string — Customer's name.
    - `Mobile` object
      - `CountryCode` string — The maximum country code length is 4 and match the following regular expression: ^(?:(\+)|(00)|(\*)|())\d{1,4}$
      - `Number` string — The maximum mobile number length is 11 and matches the following regular expression: ^(?:(\+)|(00)|(\*)|())\d{6,14}(#?)$
    - `Email` string — Required when NotificationOption = ALL or EMAIL.
    - `Reference` string — Refers to the order or transaction ID in your own system that you can link with the invoice generated for reporting purposes.
    - `CivilId` string — Extra customer identification information (optional).
  - `IntegrationUrls` object — URLs for redirecting and receiving payment status notifications.
    - `Redirection` string — URL where the user is redirected after making the payment. Use this URL to check the payment status.
    - `Webhook` 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.
  - `Language` 'EN' | 'AR' — Invoice language.
  - `IpAddress` string — The customer’s IP address
  - `MetaData` object — Custom fields stored with the transaction and returned in the webhook.
    - `UDF1` string
    - `UDF2` string
    - `UDF3` string
    - `UDF4` string
    - `UDF5` string
  - `DisplayPaymentMethods` string[] — Array of payment methods to be displayed on the invoice page. such as: ["card", "knet", "googlepay", "applepay"] If this parameter is not sent, and the PaymentMethod field is also not provided, all payment methods enabled on your account will be displayed automatically.
  - `NetworkTransactionId` string — Can be used when paying with network tokens.

## Response `201`

Payment created successfully

- object
  - `IsSuccess` string — "true" or "false" indicating the status of your request.
  - `Message` string — The message response associated with the request done
  - `ValidationErrors` object[] — A model that contains two keys "Name" and "Error". This is used to indicate the validation result for all parameters you have sent in your request. This can have one or more items based on the invalid parameter count.
  - `Data` object
    - `InvoiceId` string — A unique invoice number.
    - `PaymentId` string
    - `PaymentURL` string — URL where the customer can complete the payment.
    - `PaymentCompleted` boolean
    - `TransactionDetails` object — Contains transaction information if available; null if payment not completed.

---

[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)
