Payments
Create one-time charges and look them up by ID. Supports both hosted payment pages (HPP) and saved-card token flows.
A Payment represents one attempted charge against a customer, by card, wallet or APM. Which of those a payment's page offers is set with methods. Every payment starts in created and ends as succeeded, failed, refunded, or voided — the full state machine is in Concepts → Payments.
Create a payment
Fields worth knowing beyond the reference below:
instrumentstarts one APM at creation, for a customer who already chose it in your own checkout:ideal,bancontact,blik,twintorrevolut_bank. It needsshopperandreturnUrl, and can't be combined withmethods,cardToken,walletTokenorapplePayOnly. See Send the customer straight to the bank.shopperholds the customer's browser details:ip, required and a public IPv4 or IPv6 address, not a private or loopback one, and optionaluserAgentandlanguage. Send the customer's IP, not your server's. It is required withinstrumentand refused without it.nextActionin the response, present only wheninstrumentstarted the bank payment:{ "type": "redirect", "url": "<bank page>" }. Itsurlis the same asredirectUrl. Without it,redirectUrlis the payment page.checkoutUrlin the response, present whenevercheckoutTokenis: our payment page for this payment, which you can embed as a waiting screen.
On a request with instrument, unless the payment comes back failed, send the customer to redirectUrl. Each refusal is a 400 invalid_argument with no payment created; the messages are listed in the guide.
Create a payment.
Authentication: Basic Auth (public_key:secret_key) with merchant role.
In: header
With manual the payment is only authorized at checkout. It rests at authorized until you call POST /payments/{paymentId}/capture or /void, and is voided if you do neither before captureBefore (2 minutes after authorization). manual needs hosted checkout and must be enabled for your account in live mode; test mode always accepts it. It cannot be combined with cardToken. The checkout leaves out bank methods, and offers Apple Pay and Google Pay only where your account's wallet setup can hold the money: the response's methods shows what is offered.
"automatic" | "manual"card is the card form, wallets Apple Pay and Google Pay, apms every bank method enabled on the merchant, or name bank methods one by one. Defaults to \["card", "wallets"]. A method the merchant cannot offer is left out, and the response's methods shows what remains; a list that leaves nothing to pay with is refused. With walletToken, include wallets and no bank methods; with cardToken, no bank methods.
to the button: amount, currency, merchant and environment must match it. Implies applePayOnly: true; cannot be combined with cardToken.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sandbox.mintcash.me/payments" \ -H "Content-Type: application/json" \ -d '{ "amount": 0, "currency": "string", "customer": { "email": "string", "externalId": "string", "name": "string" }, "externalId": "string" }'{
"amount": 0,
"amountRefundable": 0,
"amountRefunded": 0,
"authMode": "string",
"captureBefore": "string",
"captureMethod": "automatic",
"captureRequestedAt": "string",
"checkoutToken": "string",
"createdAt": "string",
"currency": "string",
"externalId": "string",
"failureCode": "string",
"fundsHeld": true,
"id": "string",
"instrument": "card",
"methods": [
"card"
],
"processor": "string",
"processorMerchantId": "string",
"processorOrderReference": "string",
"processorTransactionId": "string",
"providerTransactionId": "string",
"purpose": "card_verification",
"redirectUrl": "string",
"status": "string",
"voidReason": "merchant"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}Retrieve a payment
Get a payment by ID.
Authentication: Basic Auth (public_key:secret_key) with merchant role.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://sandbox.mintcash.me/payments/string"{
"amount": 0,
"amountRefundable": 0,
"amountRefunded": 0,
"authMode": "string",
"captureBefore": "string",
"captureMethod": "automatic",
"captureRequestedAt": "string",
"checkoutToken": "string",
"createdAt": "string",
"currency": "string",
"externalId": "string",
"failureCode": "string",
"fundsHeld": true,
"id": "string",
"instrument": "card",
"methods": [
"card"
],
"processor": "string",
"processorMerchantId": "string",
"processorOrderReference": "string",
"processorTransactionId": "string",
"providerTransactionId": "string",
"purpose": "card_verification",
"redirectUrl": "string",
"status": "string",
"voidReason": "merchant"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}Capture a payment
Charges a payment created with captureMethod: "manual" once it's authorized. See Authorise now, capture later.
Capture a payment created with `captureMethod: "manual"`, for its full amount.
Returns the payment as it stands afterwards: succeeded; failed with a failureCode when the card charge was declined (final: the order needs a new payment); or still authorized with captureRequestedAt set when the bank has not answered within 10 seconds, in which case payment.succeeded or payment.failed follows by webhook.
Calling it again is safe: on a payment already captured, or with its capture in flight, it returns the payment as it is now.
Authentication: Basic Auth (public_key:secret_key) with merchant role.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sandbox.mintcash.me/payments/string/capture"{
"amount": 0,
"amountRefundable": 0,
"amountRefunded": 0,
"authMode": "string",
"captureBefore": "string",
"captureMethod": "automatic",
"captureRequestedAt": "string",
"checkoutToken": "string",
"createdAt": "string",
"currency": "string",
"externalId": "string",
"failureCode": "string",
"fundsHeld": true,
"id": "string",
"instrument": "card",
"methods": [
"card"
],
"processor": "string",
"processorMerchantId": "string",
"processorOrderReference": "string",
"processorTransactionId": "string",
"providerTransactionId": "string",
"purpose": "card_verification",
"redirectUrl": "string",
"status": "string",
"voidReason": "merchant"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}Void a payment
Releases an authorized manual-capture payment without charging it.
Void an authorized payment created with `captureMethod: "manual"`.
Nothing is charged. A hold on the customer's money is released, and a card that was only verified is made unusable. Calling it again on a voided payment returns it unchanged, with its original voidReason.
Authentication: Basic Auth (public_key:secret_key) with merchant role.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sandbox.mintcash.me/payments/string/void" \ -H "Content-Type: application/json" \ -d '{}'{
"amount": 0,
"amountRefundable": 0,
"amountRefunded": 0,
"authMode": "string",
"captureBefore": "string",
"captureMethod": "automatic",
"captureRequestedAt": "string",
"checkoutToken": "string",
"createdAt": "string",
"currency": "string",
"externalId": "string",
"failureCode": "string",
"fundsHeld": true,
"id": "string",
"instrument": "card",
"methods": [
"card"
],
"processor": "string",
"processorMerchantId": "string",
"processorOrderReference": "string",
"processorTransactionId": "string",
"providerTransactionId": "string",
"purpose": "card_verification",
"redirectUrl": "string",
"status": "string",
"voidReason": "merchant"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}Create a wallet button
Mints a standalone Apple Pay button before any payment exists. Pass its token back as walletToken on POST /payments once the customer taps.
Mint a deferred Apple Pay button.
Nothing is persisted: the button renders from a signed token carrying the merchant, environment, amount and currency, valid for 15 minutes. Create the payment only after the shopper taps, passing the token back as walletToken on POST /payments.
Authentication: Basic Auth (public_key:secret_key) with merchant role.
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sandbox.mintcash.me/wallet-buttons" \ -H "Content-Type: application/json" \ -d '{ "amount": 0, "currency": "string" }'{
"expiresAt": "string",
"token": "string",
"url": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}{
"code": "not_found",
"details": {},
"message": "string"
}