v1
latestOpenAPI 3.0.02026-08-0631139237.5 KBPayments
Confirm Payment
Confirms a payment that was created without payment details. This endpoint can only be used with payments in PENDING status.
The two-step payment flow:
- Create: First, create a payment without payment details (status: PENDING)
- Confirm: Then provide payment details to complete the transaction
When confirming a payment, you can use:
- A newly generated paymentToken from monei.js Components
- A permanent paymentToken from a previous payment (generated with generatePaymentToken: true)
Using permanent payment tokens enables one-click checkout experiences for returning customers without requiring them to re-enter their payment information.
You can provide additional customer information during confirmation, which will override any corresponding information originally passed in the payment creation request.
post/payments/{id}/confirm
Request body
Example request
{
"paymentToken": "7cc38b08ff471ccd313ad62b23b9f362b107560b",
"paymentMethod": {
"card": {
"cardholderName": "John Doe",
"cardholderEmail": "john.doe@monei.com"
}
},
"customer": {
"email": "john.doe@example.com",
"name": "John Doe"
},
"billingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"shippingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"sessionDetails": {
"ip": "100.100.200.100",
"countryCode": "ES",
"lang": "es",
"deviceType": "desktop",
"browser": "Chrome",
"browserVersion": "83.0.4103.116",
"os": "Mac OS",
"osVersion": "10.15.4",
"source": "MONEI/PHP",
"sourceVersion": "0.1.2",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...",
"browserAccept": "text/html,application/xhtml+xml,application/json",
"browserColorDepth": "24",
"browserScreenHeight": "1152",
"browserScreenWidth": "2048",
"browserTimezoneOffset": "-120"
},
"metadata": {
"systemId": "12345"
}
}Response
A payment object
Example response
{
"id": "af6029f80f5fc73a8ad2753eea0b1be0",
"amount": 110,
"currency": "EUR",
"orderId": "14379133960355",
"description": "Test Shop - #84370745531439",
"accountId": "aa9333ba-82de-400c-9ae7-087b9f8d2242",
"authorizationCode": "475816",
"status": "PENDING",
"statusCode": "E000",
"statusMessage": "Transaction approved",
"customer": {
"email": "john.doe@example.com",
"name": "John Doe"
},
"shop": {
"name": "Test Shop",
"country": "ES"
},
"billingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"shippingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"address": {
"country": "ES",
"city": "Málaga",
"line1": "Fake Street 123",
"zip": "1234",
"state": "Málaga"
}
},
"sessionDetails": {
"ip": "100.100.200.100",
"countryCode": "ES",
"lang": "es",
"deviceType": "desktop",
"browser": "Chrome",
"browserVersion": "83.0.4103.116",
"os": "Mac OS",
"osVersion": "10.15.4",
"source": "MONEI/PHP",
"sourceVersion": "0.1.2",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...",
"browserAccept": "text/html,application/xhtml+xml,application/json",
"browserColorDepth": "24",
"browserScreenHeight": "1152",
"browserScreenWidth": "2048",
"browserTimezoneOffset": "-120"
},
"traceDetails": {
"ip": "100.100.200.100",
"countryCode": "ES",
"lang": "es",
"deviceType": "desktop",
"browser": "Chrome",
"browserVersion": "83.0.4103.116",
"os": "Mac OS",
"osVersion": "10.15.4",
"source": "MONEI/PHP",
"sourceVersion": "0.1.2",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...",
"browserAccept": "text/html,application/xhtml+xml,application/json",
"browserColorDepth": "24",
"browserScreenHeight": "1152",
"browserScreenWidth": "2048",
"browserTimezoneOffset": "-120",
"userEmail": "user@example.com"
},
"paymentToken": "7cc38b08ff471ccd313ad62b23b9f362b107560b",
"paymentMethod": {
"method": "card",
"card": {
"country": "ES",
"brand": "visa",
"type": "credit",
"threeDSecureVersion": "2.1.0",
"threeDSecureFlow": "CHALLENGE",
"expiration": 2048544000,
"last4": "0004",
"fingerprint": "7f2afde1566286c5fb126bb7e79bef549755cce6033dc429013c46d1365ff0e9",
"tokenizationMethod": "applePay",
"cardholderName": "John Doe",
"cardholderEmail": "email@example.com"
},
"paypal": {
"orderId": "7XP21983KL5672104",
"payerId": "QWRTNBFHZXLPD",
"email": "john.doe@example.com",
"name": "John Doe"
},
"sepa": {
"fingerprint": "7f2afde1566286c5fb126bb7e79bef549755cce6033dc429013c46d1365ff0e9"
},
"klarna": {
"billingCategory": "PAY_LATER",
"authPaymentMethod": "card"
}
},
"sequence": {
"type": "recurring",
"recurring": {
"expiry": "20210630",
"frequency": 30
}
},
"sequenceId": "62b23b9f3627cc38b08ff471ccd313ad",
"storeId": "e5f28150d9e8974c58ab5ec9c4a880f8734dcf05",
"pointOfSaleId": "fb269cccfa0cc021f5d0b8eb1421646c696213e1",
"metadata": {
"systemId": "12345"
},
"nextAction": {
"type": "CONFIRM",
"redirectUrl": "https://secure.monei.com/payments/af6029f80f5fc73a8ad2753eea0b1be0"
},
"createdAt": 1636366897,
"updatedAt": 1636366897
}