Overview
This feature allows the merchant to hold funds during a payment process and decide later whether to capture or reverse the payment. This is particularly useful for scenarios where you want to authorize a payment but only complete the transaction once certain conditions are met.
The process is straightforward and revolves around a field called hold_and_charge_later
in the create payment link API, followed by the options to capture or reverse the payment at a later stage using the capture and reverse endpoints.
How It Works
Create a Payment Link with
hold_and_charge_later: true
Once the payment is complete, get the payment Id by fetching your transactions, or using the predefined
redirect_url
passed in the request, or using a webhook with the eventcharge_authorized
.When you're ready to capture/reverse the payment, pass the payment ID in the
chargeId
field accordingly.Sample request:
Capture:
curl --request POST \
--url https://business.mamopay.com/manage_api/v1/charges/<chargeId>/captures \
--header 'Authorization: Bearer <your api key>' \
--header 'Content-Type: application/json' \
--header 'accept: application/json'Reverse:
curl --request POST \
--url https://business.mamopay.com/manage_api/v1/charges/<chargeId>/reverses \
--header 'Authorization: Bearer <your api key>' \
--header 'Content-Type: application/json' \
--header 'accept: application/json'
Use cases
E-commerce: Authorize payments at the time of order but capture funds only after shipping.
Service-based businesses: Hold funds during booking and capture them post-service delivery.
Rental services: Authorize insurance payments upon rental, and refund when the rented property/vehicle is safely returned, capture otherwise.
FAQs
Can I hold funds in any currency?
Can I hold funds in any currency?
You can hold funds only in the following currencies: AED, USD, EUR, GBP, SAR.