API
...
Payments
Create Payment
Card Payment
1min
You can only call this API from the payer device (Browser or Mobile). It is prohibited to call this API from your backend.
Use this endpoint to create payment requests using mada and credit cards
POST
Request
Body Parameters
amount
required
Integer
Amount intended to be collected by this payment. A positive integer represents how much to charge in the smallest currency unit (e.g., 100 Halala to charge 1.00 SAR or 100 to charge ¥100, a zero-decimal currency). The minimum amount is 1 SAR or equivalent in charge currency.
currnecy
optional
String
3-letter ISO code for currency. E.g., SAR, CAD, USD. (default: SAR)
description
optional
String
An arbitrary string that you can attach to a payment object. The description is only for your reference and it is NOT displayed to users.
callback_url
required
String
The URL of the customer’s website page to be redirected to when using the payment form method or after a 3-D secure transaction (e.g., https://example.com/orders)
source
required
Object
A payment source object to be charged, such as Apple Pay source, Credit Card source, or STC pay source. The details are described below. ('creditcard' for this example)
metadata
optional
Object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
an example of the payment lifecycle would be great like adding some diagram showing a payment goes from the Client to Moyasar then 3DS and then back to the Client.
Updated 23 Jul 2024
Did this page help you?