Initiate payment

Charges a customer without them being present, using a card they saved on an earlier payment (a merchant-initiated transaction, or MIT). The same endpoint also completes Apple Pay and Google Pay payments.

Charging a saved card

  1. Create a payment link with save_card set to required, optional or required_without_checkbox (Create payment link). Sending save_card to this endpoint does nothing.
  2. When the customer pays, store the payment ID from the redirect, Fetch payment info, or the webhook. The payment details include the ID of the saved card.
  3. Call this endpoint with that card_id and the amount to charge.

See Card on file for the full flow, including what to show the customer when they save a card.

Wallet payments (Apple Pay / Google Pay)

Send payment_link_id with an apple_pay_token or google_pay_token from Create Apple Pay token or Create Google Pay token. In this mode only payment_link_id, the token and payment_ip are read; every other field is ignored. The amount, currency and customer details come from the payment link, so the link needs a fixed amount at or above the minimum, or the call returns 422. Split payments (payouts_share) and holds (hold_and_charge_later) aren't applied to wallet charges.

Wallet payments take the customer from the link, so create the link with the customer's top-level email (plus first_name / last_name). Without an email this call returns 422 email is missing.

Recipes
🔁
Save a card and charge it later
Open Recipe
📱
Add Apple Pay and Google Pay
Open Recipe
🔁
Bill a customer every month
Open Recipe
🏪
Run a marketplace: collect, hold, split and pay sellers
Open Recipe
Body Params
string

Saved card ID retrieved from the initial payment made with MIT-enabled link. Required for merchant-initiated (card-on-file) charges.

number
Defaults to 10

Amount to be charged. Required for merchant-initiated charges; for wallet charges the amount comes from the payment link. Send an amount greater than 0. The API doesn't enforce a minimum for saved-card charges; the card network or gateway may reject very small amounts.

string

Apple Pay token from the Apple Pay token endpoint. Provide this (with payment_link_id) for an Apple Pay charge.

string

Google Pay token from the Google Pay token endpoint. Provide this (with payment_link_id) for a Google Pay charge.

string

The end customer's IP address for the wallet charge (optional).

string
Defaults to AED

The three-letter ISO currency code, default is AED. Saved-card charges only; ignored for wallet charges.

boolean
Defaults to true

Enables the sending of customer receipts. Saved-card charges only; ignored for wallet charges.

custom_data
object

Key-value object that can be used to pass custom data. Saved-card charges only; ignored for wallet charges.

string

The external ID allows non Mamo IDs to be associated with a given payment. Saved-card charges only; ignored for wallet charges.

boolean
Defaults to false

Indicates whether to place the payment on hold and charge it later using the "captures" API. Saved-card charges only; ignored for wallet charges.

payouts_share
object

Splits this payment's payout with one of your recipients. Applies to this payment only. Saved-card charges only; ignored for wallet charges.

Headers
string

A unique key, such as a UUID, that makes it safe to retry this request. Reuse the same key when you retry. See Idempotency.

Responses

400

Bad Request

429

Too many requests. You sent more than 100 requests in 30 seconds from one IP address. This response has no JSON body. See Rate limits.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json