Create payment
Changed onPayment creation is elemental to the Mollie API: this is where most payment implementations start off.
Once you have created a payment, you should redirect your customer to the URL in the _links.checkout property from the response.
To wrap your head around the payment process, an explanation and flow charts can be found in the 'Accepting payments' guide.
If you specify the method parameter when creating a payment, optional additional parameters may be available for the payment method that are not listed below. Please refer to the guide on method-specific parameters.
🔑 Access with
API key
Advanced access token with payments.write
OAuth access with payments.write
Request
- Base URLhttps://api.mollie.com/v2
- URLhttps://api.mollie.com/v2/payments
- Auth
- HTTP bearer
- or HTTP bearer
- or OAuth 2Authorization code: https://my.mollie.com/oauth2/authorizeToken URL: https://api.mollie.com/oauth2/tokens scopes: payments.write
Query parameters
This endpoint allows you to include additional information via the include query string parameter.
Request body
Example request
{
"resource": "payment",
"id": "tr_5B8cwPMGnU",
"mode": "live",
"description": "Chess Board",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"amountRefunded": {
"currency": "EUR",
"value": "10.00"
},
"amountRemaining": {
"currency": "EUR",
"value": "10.00"
},
"amountCaptured": {
"currency": "EUR",
"value": "10.00"
},
"amountChargedBack": {
"currency": "EUR",
"value": "10.00"
},
"settlementAmount": {
"currency": "EUR",
"value": "10.00"
},
"redirectUrl": "https://example.org/redirect",
"cancelUrl": "https://example.org/cancel",
"webhookUrl": "https://example.org/webhooks",
"lines": [
{
"type": "physical",
"description": "LEGO 4440 Forest Police Station",
"quantity": 1,
"quantityUnit": "pcs",
"unitPrice": {
"currency": "EUR",
"value": "10.00"
},
"discountAmount": {
"currency": "EUR",
"value": "10.00"
},
"totalAmount": {
"currency": "EUR",
"value": "10.00"
},
"vatRate": "21.00",
"vatAmount": {
"currency": "EUR",
"value": "10.00"
},
"sku": "9780241661628",
"categories": [
"meal",
"eco"
],
"imageUrl": "https://...",
"productUrl": "https://...",
"recurring": {
"description": "Gym subscription",
"interval": "12 months",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"times": 1,
"startDate": "2024-12-12"
}
}
],
"billingAddress": {
"title": "Mr.",
"givenName": "Piet",
"familyName": "Mondriaan",
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "Apt. 1",
"postalCode": "1234AB",
"email": "piet@example.org",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL"
},
"shippingAddress": {
"title": "Mr.",
"givenName": "Piet",
"familyName": "Mondriaan",
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "Apt. 1",
"postalCode": "1234AB",
"email": "piet@example.org",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL"
},
"locale": "en_US",
"countryCode": "BE",
"method": "ideal",
"issuer": "ideal_INGBNL2A",
"restrictPaymentMethodsToCountry": "NL",
"captureMode": "manual",
"captureDelay": "8 hours",
"captureBefore": "2024-03-20T09:28:37+00:00",
"applicationFee": {
"amount": {
"currency": "EUR",
"value": "10.00"
},
"description": "Platform fee"
},
"routing": [
{
"resource": "route",
"id": "rt_5B8cwPMGnU",
"mode": "live",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"destination": {
"type": "organization",
"organizationId": "org_1234567"
},
"createdAt": "2024-12-12T10:00:00+00:00",
"releaseDate": "2024-12-12",
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"payment": {
"href": "https://...",
"type": "application/hal+json"
}
}
}
],
"sequenceType": "oneoff",
"subscriptionId": "sub_5B8cwPMGnU",
"mandateId": "mdt_5B8cwPMGnU",
"customerId": "cst_5B8cwPMGnU",
"profileId": "pfl_5B8cwPMGnU",
"settlementId": "stl_5B8cwPMGnU",
"orderId": "ord_5B8cwPMGnU",
"status": "open",
"statusReason": {
"code": "insufficient_funds",
"message": "The account associated with the card has insufficient funds. The shopper should use another payment method or\ncontact their bank."
},
"isCancelable": true,
"createdAt": "2024-03-20T09:13:37+00:00",
"authorizedAt": "2024-03-20T09:28:37+00:00",
"paidAt": "2024-03-20T09:28:37+00:00",
"canceledAt": "2024-03-20T09:28:37+00:00",
"expiresAt": "2024-03-20T09:28:37+00:00",
"expiredAt": "2024-03-20T09:28:37+00:00",
"failedAt": "2024-03-20T09:28:37+00:00",
"dueDate": "2025-01-01",
"storeCredentials": true,
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"checkout": {
"href": "https://...",
"type": "application/hal+json"
},
"changePaymentState": {
"href": "https://...",
"type": "application/hal+json"
},
"dashboard": {
"href": "https://...",
"type": "application/hal+json"
},
"refunds": {
"href": "https://...",
"type": "application/hal+json"
},
"chargebacks": {
"href": "https://...",
"type": "application/hal+json"
},
"captures": {
"href": "https://...",
"type": "application/hal+json"
},
"settlement": {
"href": "https://...",
"type": "application/hal+json"
},
"customer": {
"href": "https://...",
"type": "application/hal+json"
},
"mandate": {
"href": "https://...",
"type": "application/hal+json"
},
"subscription": {
"href": "https://...",
"type": "application/hal+json"
},
"order": {
"href": "https://...",
"type": "application/hal+json"
},
"documentation": {
"href": "https://...",
"type": "application/hal+json"
}
}
}Response
The newly created payment object.
Example response
{
"resource": "payment",
"id": "tr_5B8cwPMGnU",
"mode": "live",
"description": "Chess Board",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"amountRefunded": {
"currency": "EUR",
"value": "10.00"
},
"amountRemaining": {
"currency": "EUR",
"value": "10.00"
},
"amountCaptured": {
"currency": "EUR",
"value": "10.00"
},
"amountChargedBack": {
"currency": "EUR",
"value": "10.00"
},
"settlementAmount": {
"currency": "EUR",
"value": "10.00"
},
"redirectUrl": "https://example.org/redirect",
"cancelUrl": "https://example.org/cancel",
"webhookUrl": "https://example.org/webhooks",
"lines": [
{
"type": "physical",
"description": "LEGO 4440 Forest Police Station",
"quantity": 1,
"quantityUnit": "pcs",
"unitPrice": {
"currency": "EUR",
"value": "10.00"
},
"discountAmount": {
"currency": "EUR",
"value": "10.00"
},
"totalAmount": {
"currency": "EUR",
"value": "10.00"
},
"vatRate": "21.00",
"vatAmount": {
"currency": "EUR",
"value": "10.00"
},
"sku": "9780241661628",
"categories": [
"meal",
"eco"
],
"imageUrl": "https://...",
"productUrl": "https://...",
"recurring": {
"description": "Gym subscription",
"interval": "12 months",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"times": 1,
"startDate": "2024-12-12"
}
}
],
"billingAddress": {
"title": "Mr.",
"givenName": "Piet",
"familyName": "Mondriaan",
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "Apt. 1",
"postalCode": "1234AB",
"email": "piet@example.org",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL"
},
"shippingAddress": {
"title": "Mr.",
"givenName": "Piet",
"familyName": "Mondriaan",
"organizationName": "Mollie B.V.",
"streetAndNumber": "Keizersgracht 126",
"streetAdditional": "Apt. 1",
"postalCode": "1234AB",
"email": "piet@example.org",
"city": "Amsterdam",
"region": "Noord-Holland",
"country": "NL"
},
"locale": "en_US",
"countryCode": "BE",
"method": "ideal",
"issuer": "ideal_INGBNL2A",
"restrictPaymentMethodsToCountry": "NL",
"captureMode": "manual",
"captureDelay": "8 hours",
"captureBefore": "2024-03-20T09:28:37+00:00",
"applicationFee": {
"amount": {
"currency": "EUR",
"value": "10.00"
},
"description": "Platform fee"
},
"routing": [
{
"resource": "route",
"id": "rt_5B8cwPMGnU",
"mode": "live",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"destination": {
"type": "organization",
"organizationId": "org_1234567"
},
"createdAt": "2024-12-12T10:00:00+00:00",
"releaseDate": "2024-12-12",
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"payment": {
"href": "https://...",
"type": "application/hal+json"
}
}
}
],
"sequenceType": "oneoff",
"subscriptionId": "sub_5B8cwPMGnU",
"mandateId": "mdt_5B8cwPMGnU",
"customerId": "cst_5B8cwPMGnU",
"profileId": "pfl_5B8cwPMGnU",
"settlementId": "stl_5B8cwPMGnU",
"orderId": "ord_5B8cwPMGnU",
"status": "open",
"statusReason": {
"code": "insufficient_funds",
"message": "The account associated with the card has insufficient funds. The shopper should use another payment method or\ncontact their bank."
},
"isCancelable": true,
"createdAt": "2024-03-20T09:13:37+00:00",
"authorizedAt": "2024-03-20T09:28:37+00:00",
"paidAt": "2024-03-20T09:28:37+00:00",
"canceledAt": "2024-03-20T09:28:37+00:00",
"expiresAt": "2024-03-20T09:28:37+00:00",
"expiredAt": "2024-03-20T09:28:37+00:00",
"failedAt": "2024-03-20T09:28:37+00:00",
"dueDate": "2025-01-01",
"storeCredentials": true,
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"checkout": {
"href": "https://...",
"type": "application/hal+json"
},
"changePaymentState": {
"href": "https://...",
"type": "application/hal+json"
},
"dashboard": {
"href": "https://...",
"type": "application/hal+json"
},
"refunds": {
"href": "https://...",
"type": "application/hal+json"
},
"chargebacks": {
"href": "https://...",
"type": "application/hal+json"
},
"captures": {
"href": "https://...",
"type": "application/hal+json"
},
"settlement": {
"href": "https://...",
"type": "application/hal+json"
},
"customer": {
"href": "https://...",
"type": "application/hal+json"
},
"mandate": {
"href": "https://...",
"type": "application/hal+json"
},
"subscription": {
"href": "https://...",
"type": "application/hal+json"
},
"order": {
"href": "https://...",
"type": "application/hal+json"
},
"documentation": {
"href": "https://...",
"type": "application/hal+json"
}
}
}Changes
- breaking
added
subschema #1subschema #2subschema #3to the request bodyallOflist - warning
removed
subschema #1subschema #2subschema #3from the request bodyallOflist - info
added
subschema #1subschema #2to the response bodyallOflist for the response status - info
removed
subschema #1subschema #2from the response bodyallOflist for the response status
- breaking