Get payment¶
Warning
The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.
The documentation for retrieving payments in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.
GET
https://api.mollie.com/v1/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, the testmode
query string parameter is available. You must pass this as a
parameter in the query string if you want to retrieve a payment that was created in test mode.
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.
settlement
Include the settlement this payment belongs to, when available.details.qrCode
Include a QR code object. Only available for iDEAL, Bancontact and bank transfer payments.
Response¶
200
application/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
createdDatetime
datetimestatus
stringisCancelable
booleanpaidDatetime
datetimecancelledDatetime
datetimeexpiredDatetime
datetimeexpiryPeriod
durationfailedDatetime
datetimeamount
decimalamountRefunded
decimalamountRemaining
decimaldescription
stringmethod
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
banktransfer
belfius
billie
creditcard
directdebit
eps
, giftcard
giropay
ideal
kbc
klarnapaylater
klarnapaynow
klarnasliceit
mistercash
mybank
paypal
paysafecard
przelewy24
sofort
metadata
mixedlocale
stringlocale
parameter, or detected by us during
checkout. Will be a full locale, for example nl_NL
.countryCode
stringBE
.profileId
stringpfl_QkEhN94Ba
.settlementId
stringstl_BkEjN2eBb
.issuer
stringfailureReason
stringOnly available for failed Bancontact and credit card 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
links
objectAn object with several URLs important to the payment process.
paymentUrl
stringoptionalThe 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 paymentUrl
.
webhookUrl
stringoptionalredirectUrl
stringThe URL your customer will be redirected to after completing or canceling the payment process.
Note
The URL will be null
for recurring payments.
settlement
stringoptionalrefunds
stringoptionalchargebacks
stringoptionalResponse parameters for recurring payments¶
This field indicates the position of the payment in a recurring stream. Refer to the recurring payments guide for more information.
Possible values: null
first
recurring
cst_XPn78q9CfT
. When the customer has been deleted this property will still be set.Payment 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
The fingerprint is now (as of November 28th, 2019) unique per transaction what makes it not useful
anymore for identifying returning customers. Use the consumerAccount
field instead.
qrCode
objectconsumerName
stringconsumerAccount
stringconsumerBic
stringBank transfer¶
details
objectAn object with payment details.
bankName
stringbankAccount
stringbankBic
stringtransferReference
stringconsumerName
stringconsumerAccount
stringconsumerBic
stringbillingEmail
stringBelfius 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
EPS¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
stringGift 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
decimalvoucherNumber
string606436353088147****
remainderAmount
decimalremainderMethod
stringGiropay¶
details
objectAn object with payment details.
consumerName
stringconsumerAccount
stringconsumerBic
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
.paypalFee
decimalpaysafecard¶
details
objectAn object with payment details.
consumerName
stringSEPA 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
stringissuerName
stringamount
decimalremainderAmount
decimalremainderMethod
stringMollie Connect response parameters¶
The application fee, if the payment was created with one.
amount
decimaldescription
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:
height
integerwidth
integersrc
stringFor an implemention guide, see our QR codes guide.
Example¶
Request¶
1 2 | curl -X GET https://api.mollie.com/v1/payments/tr_WDqYK6vllg \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
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 | HTTP/1.1 200 OK Content-Type: application/json { "resource": "payment", "id": "tr_WDqYK6vllg", "mode": "test", "createdDatetime": "2018-03-16T14:30:07.0Z", "status": "paid", "paidDatetime": "2018-03-16T14:34:50.0Z", "amount": "35.07", "description": "Order 33", "method": "ideal", "metadata": { "order_id": "33" }, "details": { "consumerName": "Hr E G H Kloppers en/of MW M.J. Kloppers-Veeneman", "consumerAccount": "NL53INGB0618365937", "consumerBic": "INGBNL2A" }, "locale": "nl_NL", "profileId": "pfl_QkEhN94Ba", "links": { "webhookUrl": "https://webshop.example.org/payments/webhook", "redirectUrl": "https://webshop.example.org/order/33/" } } |