v1
latestOpenAPI 3.0.02026-07-1412068.2 KBCreate Payment Link
API to generate vanilla and subscription payment links. <br> <h3>Payment Status</h3> Once your customer completes a payment, the redirect URL will be appended with the following params<br> - createdAt: The date the charge was captured at<br> - paymentLinkId: The payment link id<br> - status: indicates the payment status, whether captured or failed<br> - transactionId: The transaction / charge id related to the payment<br> <br> You may also get notified about a payment's status by setting up a webhook. Details here<br> <br> A third approach to check the transaction status is by calling our transaction info API here<br> <br> Sample redirect url after a successful payment<br> https://www.mamopay.com/?createdAt=2023-08-09-16-42-35&paymentLinkId=MB-LINK-3216D27C9D&status=captured&transactionId=MPB-CHRG-BEE56990A9<br> <br>
<h3>For Payment Testing</h3> <p>To make payments with different use cases on the test environment, you can use the card details below alongside the below CVV and expiry date.</p> - CVV: 123<br> - Expiry: 01/28 <table> <thead> <tr> <th>Card Number</th> <th>Payment Status</th> <th>3DS</th> <th>Address Required</th> <th>Country</th> </tr> </thead> <tbody> <tr> <td>4659 1055 6905 1157</td> <td>Success</td> <td>X</td> <td>X</td> <td>GB</td> </tr> <tr> <td>4242 4242 4242 4242</td> <td>Success</td> <td>✓</td> <td>X</td> <td>GB</td> </tr> <tr> <td>4111 1111 1111 1111</td> <td>Success</td> <td>✓</td> <td>✓</td> <td>US</td> </tr> <tr> <td>4567 3613 2598 1788</td> <td>Fail</td> <td>X</td> <td>X</td> <td>GB</td> </tr> <tr> <td>4095 2548 0264 2505</td> <td>Fail</td> <td>X</td> <td>✓</td> <td>US</td> </tr> </tbody> </table><br> <h3>3DS</h3> If prompted for a password, enter Checkout1!<br> <br> <h3>Subscriptions</h3> When setting up subscriptions, if both end_date and payment_quantity were defined, end_date takes precedence.<br><br>
Headers
Request body
Example request
{
"title": "Chocolate Box - Small",
"description": "12pcs Chocolate Box",
"capacity": 1,
"active": true,
"return_url": "https://myawesomewebsite.com/paymentSuccess",
"failure_return_url": "https://failurewebsite.com/paymentFailure",
"terms_and_conditions_url": "https://myawesomewebsite.com/terms",
"processing_fee_percentage": 3,
"amount": 119.99,
"amount_currency": "AED",
"enable_message": true,
"enable_tips": true,
"save_card": "optional",
"enable_tabby": true,
"link_type": "modal",
"enable_customer_details": true,
"payment_methods": [
"card",
"wallet"
],
"rules": {
"allowed": [
{
"type": "bins"
},
{
"list": [
"424242"
]
},
{
"decline_message": "Custom decline message for this rule"
}
]
},
"subscription": {
"frequency": "monthly",
"frequency_interval": 1,
"start_date": "2023/01/01",
"end_date": "2023/02/31",
"payment_quantity": 5
},
"first_name": "first name",
"last_name": "last name",
"email": "email@mamopay.com",
"custom_data": {
"val1": true,
"val2": "custom value"
},
"external_id": "ORDER-12345",
"hold_and_charge_later": false
}Response
Successful response
Example response
{
"id": "MB-LINK-37D90AAF51",
"title": "Test Payment Link",
"name": "Test Payment Link",
"description": "Test description",
"capacity": 1,
"active": true,
"return_url": "https://myawesomewebsite.com/paymentSuccess",
"failure_return_url": null,
"amount": 10,
"amount_currency": "AED",
"send_customer_receipt": true,
"platform": "client",
"prefilled_customer": {},
"external_id": null,
"hold_and_charge_later": false,
"internal_note": null,
"lang": "en",
"expiration_date": null,
"enable_tabby": false,
"is_widget": false,
"link_type": "standalone",
"max_amount": null,
"processing_fee_percentage": 0,
"processing_fee_amount": null,
"enable_message": false,
"enable_tips": false,
"enable_quantity": false,
"payment_methods": [
"card",
"wallet"
],
"rules": {
"allowed": []
},
"enable_customer_details": false,
"payment_url": "https://sandbox.dev.business.mamopay.com/pay/mamo-c1f890",
"save_card": "off",
"terms_and_conditions_url": null,
"subscription": null,
"payouts_share": null,
"custom_data": {}
}