v1
latestOpenAPI 3.0.02026-07-1412068.2 KBTransactions
Initiate Payment
API to initiate transactions by merchant. <br> <h3>About MIT (Merchant Initiated Transaction)</h3> Merchant Initiated Transactions (MIT) allows a business to use card details, that were stored during previous transactions, to charge their customers.<br> <br> <h3>How do MITs work?</h3> 1- You request a payment link with the option to save the card details.<br> 2- You save the charge ID.<br> 3- You get the charge details (redirect, GET /charge, or webhook) which will include the ID of the card used to make the payment, you can save either one of the IDs so you always have access to the card ID.<br> 4- You call the below API to initiate a transaction using the same card.<br>
post/charges
Headers
Content-Typestring
Authorizationstring
Request body
Example request
{
"card_id": "CARD-5DF50209F8",
"amount": 10,
"custom_data": {
"internal_customer_id": "0114120d-c394-4cce-9cdb-4ccbae605748",
"val1": true,
"val2": "custom value"
},
"external_id": "ORDER-12345",
"hold_and_charge_later": false
}Response
Successful response
Example response
{
"status": "captured",
"id": "MPB-CHRG-E0CE93E071",
"amount": 100,
"amount_currency": "AED",
"refund_amount": 0,
"refund_status": "No refund",
"billing_descriptor": "Mamo*Merchant",
"custom_data": {
"internal_customer_id": "0114120d-c394-4cce-9cdb-4ccbae605748",
"val1": true,
"val2": "custom value"
},
"created_date": "2023-05-31-11-18-57",
"subscription_id": "MPB-SUB-B764EDCBA2",
"next_payment_date": "05/06/2023",
"settlement_amount": 356.42,
"settlement_currency": "AED",
"settlement_date": "05/06/2023",
"customer_details": {
"name": "Mamo User",
"email": "email@mamopay.com",
"phone_number": "+971551234567",
"comment": "Dolore voluptate possimus et."
},
"payment_method": {
"type": "CREDIT VISA",
"card_holder_name": "Mamo User",
"card_last4": "•••• 4242",
"origin": "UAE card"
},
"error_code": "generic",
"error_message": "Unknown reason - user should contact their bank to find out"
}