Get payment¶
GET
https://api.mollie.com/v2/payments/*id*
Retrieve a single payment object by its payment token.
Note
We call your webhook when the payment status changes, so there’s no need to poll this endpoint for status changes.
Parameters¶
Replace id
in the endpoint URL by the payment’s ID, for example tr_7UhSN1zuXS
.
Access token parameters¶
If you are using organization access tokens or are creating an
OAuth app, you can enable test mode through the testmode
query string parameter.
true
to get a payment made in test mode. If you omit this parameter, you can only retrieve live mode
payments.Includes¶
This endpoint allows you to include additional information by appending the following values via the include
querystring parameter.
details.qrCode
Include a QR code object. Only available for iDEAL, Bancontact and bank transfer payments.details.remainderDetails
Include the Payment method-specific response parameters of the ‘remainder payment’ as well. This applies to gift card and voucher payments where only part of the payment was completed with gift cards or vouchers, and the remainder was completed with a regular payment method.
Response¶
200
application/hal+json
resource
stringpayment
for this endpoint.id
stringtr_7UhSN1zuXS
. Its ID will always be used by Mollie to refer to a certain payment.mode
stringThe mode used to create this payment. Mode determines whether a payment is real (live mode) or a test payment.
Possible values: live
test
createdAt
datetimestatus
stringisCancelable
booleanoptionalauthorizedAt
datetimeoptionalpaidAt
datetimeoptionalcanceledAt
datetimeoptionalexpiresAt
datetimeoptionalexpiredAt
datetimeoptionalfailedAt
datetimeoptionalamount
amount objectThe amount of the payment, e.g. {"currency":"EUR", "value":"100.00"}
for a €100.00 payment.
currency
stringvalue
stringamountRefunded
amount objectoptionalThe total amount that is already refunded. Only available when refunds are available for this payment. For some payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the costs for a return shipment to the customer.
currency
stringvalue
stringamountRemaining
amount objectoptionalThe remaining amount that can be refunded. Only available when refunds are available for this payment.
currency
stringvalue
stringamountCaptured
amount objectoptionalThe total amount that is already captured for this payment. Only available when this payment supports captures.
currency
stringvalue
stringamountChargedBack
amount objectoptionalThe total amount that was charged back for this payment. Only available when the total charged back amount is not zero.
currency
stringvalue
stringsettlementAmount
amount objectoptionalThis optional field will contain the approximate amount that will be settled to your account, converted to the
currency your account is settled in. It follows the same syntax as the amount
property.
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is
settled by Mollie the settlementAmount
is omitted from the response.
Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments.
description
stringredirectUrl
stringThe URL your customer will be redirected to after completing or canceling the payment process.
The URL will be null
for recurring payments.
cancelUrl
stringoptionalThe optional redirect URL you provided during payment creation. Consumer that explicitly cancel the payment will be
redirected to this URL if provided, or otherwise to the redirectUrl
instead — see above.
Mollie will always give you status updates via webhooks, including for the canceled
status. This parameter is therefore entirely optional, but can be useful when implementing a dedicated
consumer-facing flow to handle payment cancellations.
The URL will be null
for recurring payments.
webhookUrl
stringoptionallocale
stringoptionallocale
parameter, or detected by us during
checkout. Will be a full locale, for example nl_NL
.countryCode
stringoptionalBE
. This field is omitted if the country code was not detected.method
stringThe payment method used for this payment, either forced on creation by specifying the method
parameter, or
chosen by the customer on our payment method selection screen.
If the payment is only partially paid with a gift card, the method remains giftcard
.
Possible values: null
bancontact
banktransfer
billie
belfius
creditcard
directdebit
eps
giftcard
giropay
ideal
in3
kbc
klarnapaylater
klarnapaynow
klarnasliceit
mybank
paypal
paysafecard
przelewy24
sofort
The country code you provided upon payment creation, to restrict the payment methods available to your customer to methods from a single country only.
The field expects a country code in ISO 3166-1 alpha-2 format, for example NL.
profileId
stringpfl_QkEhN94Ba
.settlementId
stringoptionalstl_BkEjN2eBb
.orderId
stringoptional_links
objectAn object with several URL objects relevant to the payment. Every URL object will contain an href
and a type
field.
self
URL objectcheckout
URL objectoptionalThe URL your customer should visit to make the payment. This is where you should redirect the consumer to.
Note
You should use HTTP GET
for the redirect to the checkout URL. Using HTTP POST
for redirection
will cause issues with some payment methods or iDEAL issuers. Use HTTP status code 303 See Other
to force
an HTTP GET
redirect.
Recurring payments do not have a checkout URL.
mobileAppCheckout
URL objectoptionalThe deeplink URL to the app of the payment method. Currently only available for bancontact
.
Warning
You should check if your customer has the required app on their mobile device before redirecting to this URL. Mobile operating systems will ignore the redirect to this URL if the correct app is not installed.
dashboard
URL objectrefunds
URL objectoptionalchargebacks
URL objectoptionalcaptures
URL objectoptionalsettlement
URL objectoptionaldocumentation
URL objectorder
URL objectoptionalterminal
URL objectoptionalResponse parameters for recurring payments¶
Indicates which type of payment this is in a recurring sequence. Set to first
for
first payments that allow the customer to agree to automatic recurring
charges taking place on their account in the future. Set to recurring
for payments where the customer’s card is
charged automatically.
Set to oneoff
by default, which indicates the payment is a regular non-recurring payment.
Possible values: oneoff
first
recurring
cst_XPn78q9CfT
.The _links
object will contain additional useful URL objects for recurring payments.
changePaymentState
URL objectoptionalRecurring payments do not have a checkout URL, because these payments are executed without any user interaction. This link is included for test mode recurring payments, and allows you to set the final payment state for such payments.
This link is also included for paid test mode payments. This allows you to create a refund or chargeback for the payment. This works for all payment types that can be charged back and/or refunded.
mandate
URL objectoptionalsubscription
URL objectoptionalcustomer
URL objectoptionalResponse parameters for pre-authorized payments¶
captureMode
stringoptionalIndicates whether the capture will be scheduled automatically or not. Set to manual
for payments that can be
captured manually using the Create capture endpoint.
Set to automatic
by default, which indicates the payment will be captured automatically, without having to
separately request it.
Possible values: automatic
manual
captureDelay
stringoptionalIndicates the interval to wait before the payment is captured, for example 8 hours
or 2 days
. The capture
delay will be added to the date and time the payment became authorized.
Possible values: ... hours
... days
captureBefore
dateoptionalPayment method-specific response parameters¶
If the payment has been created with a method
, or if the customer selected a method in the payment method selection
screen, a details
object becomes available on the payment object. This object contains detail fields specific to the
selected payment method.
Bancontact¶
details
objectAn object with payment details.
cardNumber
stringcardFingerprint
stringOnly available if the payment is completed - Unique alphanumeric representation of card, usable for identifying returning customers.
Warning
This field is deprecated as of November 28th, 2019. The fingerprint is now unique per
transaction, which makes it not useful anymore for identifying returning customers. Use the consumerAccount
field instead.
qrCode
QR code objectconsumerName
stringconsumerAccount
stringconsumerBic
stringfailureReason
stringBank transfer¶
details
objectAn object with payment details.
bankName
stringbankAccount
stringbankBic
stringtransferReference
stringconsumerName
stringconsumerAccount
stringconsumerBic
stringbillingEmail
string_links
objectFor bank transfer payments, the _links
object will contain some additional URL objects relevant to the payment.
status
URL objectpayOnline
URL objectBelfius Pay Button¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
stringGKCCBEBB
.Credit card¶
details
objectAn object with payment details.
cardHolder
stringcardNumber
stringcardFingerprint
stringcardAudience
stringOnly available if the payment has been completed and if the data is available - The card’s target audience.
Possible values: consumer
business
null
cardLabel
stringOnly available if the payment has been completed - The card’s label. Note that not all labels can be processed through Mollie.
Possible values: American Express
Carta Si
Carte Bleue
Dankort
Diners Club
Discover
JCB
Laser
Maestro
Mastercard
Unionpay
Visa
null
cardCountryCode
stringBE
.cardSecurity
stringOnly available if the payment has been completed – The type of security used during payment processing.
Possible values: normal
3dsecure
feeRegion
stringOnly available if the payment has been completed – The fee region for the payment. The intra-eu
value is for
consumer cards from the EEA.
Possible values: american-express
amex-intra-eea
carte-bancaire
intra-eu
intra-eu-corporate
domestic
maestro
other
failureReason
stringOnly available for failed payments. Contains a failure reason code.
Possible values: authentication_abandoned
authentication_failed
authentication_required
authentication_unavailable_acs
card_declined
card_expired
inactive_card
insufficient_funds
invalid_cvv
invalid_card_holder_name
invalid_card_number
invalid_card_type
possible_fraud
refused_by_issuer
unknown_reason
failureMessage
stringA localized message that can be shown to your customer, depending on the failureReason
.
Example value: Der Kontostand Ihrer Kreditkarte ist unzureichend. Bitte verwenden Sie eine andere Karte.
.
wallet
stringoptionalThe wallet used when creating the payment.
Possible values: applepay
Gift cards¶
details
objectAn object with payment details.
voucherNumber
string606436353088147****
.giftcards
arrayA list of details of all giftcards that are used for this payment. Each object will contain the following properties.
issuer
stringamount
amount objectThe amount in EUR that was paid with this gift card.
currency
stringvalue
stringvoucherNumber
string606436353088147****
remainderAmount
amount objectOnly available if another payment method was used to pay the remainder amount – The amount that was paid with another payment method for the remainder amount.
currency
stringvalue
stringremainderMethod
stringiDEAL¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
stringKBC/CBC Payment Button¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
stringPayPal¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringpaypalReference
string9AL35361CF606152E
.paypalPayerId
stringWDJJHEBZ4X2LY
.sellerProtection
stringoptionalIndicates if the payment is eligible for PayPal’s Seller Protection.
Possible values: Eligible
Ineligible
Partially Eligible - INR Only
Partially Eligible - Unauth Only
PartiallyEligible
None
Active Fraud Control - Unauth Premium Eligible
This parameter is omitted if we did not received the information from PayPal.
shippingAddress
address objectoptionalThe shipping address details.
streetAndNumber
stringpostalCode
stringcity
stringregion
stringcountry
stringpaypalFee
amount objectoptionalThe amount of fee PayPal will charge for this transaction. This field is omitted if PayPal will not charge a fee for this transaction.
currency
stringvalue
stringpaysafecard¶
details
objectAn object with payment details.
customerReference
stringPoint of sale¶
details
objectAn object with payment details.
terminalId
stringterm_utGtYu756h
.cardNumber
stringcardFingerprint
stringcardAudience
stringOnly available if the payment has been completed and if the data is available - The card’s target audience.
Possible values: consumer
business
null
cardLabel
stringOnly available if the payment has been completed - The card’s label. Note that not all labels can be processed through Mollie.
Possible values: American Express
Carta Si
Carte Bleue
Dankort
Diners Club
Discover
JCB
Laser
Maestro
Mastercard
Unionpay
Visa
null
cardCountryCode
stringBE
.SEPA Direct Debit¶
details
objectAn object with payment details.
transferReference
stringcreditorIdentifier
stringconsumerName
stringconsumerAccount
stringconsumerBic
stringdueDate
dateYYYY-MM-DD
format.signatureDate
dateYYYY-MM-DD
format.bankReasonCode
stringbankReason
stringendToEndIdentifier
stringmandateReference
stringbatchReference
stringfileReference
stringSOFORT Banking¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
stringVouchers¶
details
objectAn object with payment details.
issuer
stringvouchers
arrayA list of details of all vouchers that are used for this payment. Each object will contain the following properties.
issuer
stringamount
amount objectThe amount that was paid with this voucher.
currency
stringvalue
stringremainderAmount
amount objectOnly available if another payment method was used to pay the remainder amount – The amount that was paid with another payment method for the remainder amount.
currency
stringvalue
stringremainderMethod
stringMollie Connect response parameters¶
The application fee, if the payment was created with one.
amount
amount objectThe application fee amount as specified during payment creation.
currency
stringvalue
stringdescription
stringQR codes (optional)¶
A QR code object with payment method-specific values is available for certain payment methods if you pass the include
details.qrCode
to the resource endpoint.
The qrCode
key in the details
object will then become available. The key will contain this object:
For an implementation guide, see our QR codes guide.
Example¶
1 2 | curl -X GET https://api.mollie.com/v2/payments/tr_WDqYK6vllg \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
1 2 3 4 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); $payment = $mollie->payments->get("tr_WDqYK6vllg"); |
1 2 3 4 5 6 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") payment = mollie_client.payments.get("tr_WDqYK6vllg", embed="refunds,chargebacks", include="details.qrCode") |
1 2 3 4 5 6 7 | require 'mollie-api-ruby' Mollie::Client.configure do |config| config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' end payment = Mollie::Payment.get('tr_WDqYK6vllg') |
1 2 3 4 | const { createMollieClient } = require('@mollie/api-client'); const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' }); const payment = await mollieClient.payments.get('tr_Eq8xzWUPA4'); |
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | HTTP/1.1 200 OK Content-Type: application/hal+json { "resource": "payment", "id": "tr_WDqYK6vllg", "mode": "test", "createdAt": "2018-03-20T13:13:37+00:00", "amount": { "value": "10.00", "currency": "EUR" }, "description": "Order #12345", "method": null, "metadata": { "order_id": "12345" }, "status": "open", "isCancelable": false, "locale": "nl_NL", "restrictPaymentMethodsToCountry": "NL", "expiresAt": "2018-03-20T13:28:37+00:00", "details": null, "profileId": "pfl_QkEhN94Ba", "sequenceType": "oneoff", "redirectUrl": "https://webshop.example.org/order/12345/", "webhookUrl": "https://webshop.example.org/payments/webhook/", "_links": { "self": { "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg", "type": "application/hal+json" }, "checkout": { "href": "https://www.mollie.com/payscreen/select-method/WDqYK6vllg", "type": "text/html" }, "dashboard": { "href": "https://www.mollie.com/dashboard/org_12345678/payments/tr_WDqYK6vllg", "type": "text/html" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/payments-api/get-payment", "type": "text/html" } } } |