Get payment
Payments API

GET
https://api.mollie.nl/v1/payments/id
Authentication: API keys OAuth access tokens

Retrieve a single payment object by its payment identifier.

Please 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.

Mollie Connect/OAuth parameters

If you're creating an app with Mollie Connect/OAuth, the testmode 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.

testmode
boolean

Optional – Set this to true to get a payment made in test mode. If you omit this parameter, you can only retrieve live mode payments.

Includes

Some endpoints allow you to indicate if you want more information to be included in the API response 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, Bitcoin and bank transfer payments).

Response

200
application/json; charset=utf-8
resource
string

Indicates the response contains a payment object.

Possible values: payment

id
string

The identifier uniquely referring to this payment. Mollie assigns this identifier randomly at payment creation time. For example tr_7UhSN1zuXS. Its ID will always be used by Mollie to refer to a certain payment.

mode
string

The mode used to create this payment. Mode determines whether a payment is real or a test payment.

Possible values: live test

createdDatetime
datetime

The payment's date and time of creation, in ISO 8601 format.

status
string

The payment's status. Please refer to the page about statuses for more info about which statuses occur at what point.

Possible values: open cancelled expired failed pending paid paidout refunded charged_back

canBeCancelled
boolean

Optional – Whether or not the payment can be cancelled.

paidDatetime
datetime

Optional – The date and time the payment became paid, in ISO 8601 format. Null is returned if the payment isn't completed (yet).

cancelledDatetime
datetime

Optional – The date and time the payment was cancelled, in ISO 8601 format. Null is returned if the payment isn't cancelled (yet).

expiredDatetime
datetime

Optional – The date and time the payment was expired, in ISO 8601 format. Null is returned if the payment did not expire (yet).

expiryPeriod
duration

Optional – The time until the payment will expire in ISO 8601 duration format.

amount
decimal

The amount in EURO.

amountRefunded
decimal

Only available when refunds are available for this payment – The total amount in EURO that is already refunded. 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.

amountRemaining
decimal

Only available when refunds are available for this payment – The remaining amount in EURO that can be refunded.

description
string

A short description of the payment. The description will be shown on the customer's bank or card statement when possible.

method
string | null

The 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: banktransfer belfius bitcoin creditcard directdebit giftcard ideal inghomepay kbc mistercash paypal paysafecard sofort

metadata
object | null

The optional metadata you provided upon payment creation. Metadata can be used to link an order to a payment.

locale
string

Optional – The customer's locale, either forced on creation by specifying the locale parameter, or detected by us during checkout.

countryCode
string

Optional – The customer's ISO 3166-1 alpha-2 country code, detected by us during checkout. For example: BE.

profileId
string

The identifier referring to the profile this payment was created on. For example, pfl_QkEhN94Ba.

settlementId
string

Optional – The identifier referring to the settlement this payment belongs to. For example, stl_BkEjN2eBb.

customerId
string

If a customer ID was specified upon payment creation, the ID will be available here as well.

recurringType
string

Only available for recurring payments – Learn more about the recurringType parameter.

Possible values: first recurring null

mandateId
string

Only available for recurring payments – If the payment is a recurring payment, this field will hold the ID of the mandate used to authorize the recurring payment.

subscriptionId
string

Only available for recurring payments – When implementing the Subscriptions API, any recurring charges resulting from the subscription will hold the ID of the subscription that triggered the payment.

issuer
string

Only available for payment methods that use an issuer, e.g. iDEAL, KBC/CBC payment button and gift cards – The ID of the issuer that was used during the payment

failureReason
string

Only available for failed Bancontact and credit card payments. – A textual desciption of the failure reason.

Possible values: invalid_card_number invalid_cvv invalid_card_holder_name card_expired invalid_card_type refused_by_issuer insufficient_funds inactive_card

links
object

An object with several URLs important to the payment process.

paymentUrl
string | null

The URL your customer should visit to make the payment. This is where you should redirect the consumer to. Make sure you redirect using HTTP GET method.

webhookUrl
string

Optional – The URL Mollie will call as soon an important status change takes place.

redirectUrl
string | null

The URL the customer will be redirected to after completing or cancelling the payment process. Is null for recurring payments

settlement
string | null

The API resource URL of the settlement this payment belongs to.

refunds
string | null

The API resource URL of the refunds that belong to this payment.

chargebacks
string | null

The API resource URL of the chargebacks that belong to this payment.

Payment method specific details

A detail object with payment method specific values is available for certain payment methods. Note that we may occasionally add new fields or values.

details
object | null

An object with the consumer bank account details.

consumerName
string

Only available if the payment has been completed – The consumer's name.

consumerAccount
string

Only available if the payment has been completed – The consumer's IBAN.

consumerBic
string

Only available if the payment has been completed – The consumer's bank's BIC.

qrCode
object

Only available when no issuer is set and when explicitly included. – A QR code that can be scanned by the mobile iDEAL application. This enables the desktop to mobile feature.

details
object | null

An object with credit card details.

cardHolder
string

The card holder's name.

cardNumber
string

The last four digits of the card number.

cardFingerprint
string

Unique alphanumeric representation of card, usable for identifying returning customers.

cardAudience
string | null

Not always available. – The card's target audience.

Possible values: consumer business NULL

cardLabel
string | null

The card's label. Note that not all labels can be acquired through Mollie.

Possible values: American Express Carta Si Carte Bleue Dankort Diners Club Discover JCB Laser Maestro Mastercard Unionpay Visa NULL

cardCountry
string | null

Name of the country the card was issued in. For example: Belgium.

cardCountryCode
string | null

The ISO 3166-1 alpha-2 country code of the country the card was issued in. For example: BE.

cardSecurity
string | null

Only available if the payment succeeded. – The payment's security type.

Possible values: normal 3dsecure

feeRegion
string

Only available if the payment succeeded. – The fee region for the payment. See your credit card addendum for details. intra-eu for consumer cards from the EU, and other for all other cards.

Possible values: intra-eu other

details
object | null

An object with Bancontact details.

cardNumber
string

The last four digits of the card number.

cardFingerprint
string

Unique alphanumeric representation of card, usable for identifying returning customers.

details
object | null

An object with bank transfer details.

bankName
string

The name of the bank the consumer should wire the amount to.

bankAccount
string

The IBAN the consumer should wire the amount to.

bankBic
string

The BIC of the bank the consumer should wire the amount to.

transferReference
string

The reference the consumer should use when wiring the amount. Note you should not apply any formatting here; show it to the consumer as-is.

consumerName
string

Only available if the payment has been completed – The consumer's name.

consumerAccount
string

Only available if the payment has been completed – The consumer's bank account. This may be an IBAN, or it may be a domestic account number.

consumerBic
string

Only available if the payment has been completed – The consumer's bank's BIC / SWIFT code.

billingEmail
string

Only available if filled out in the API or by the consumer – The email address which the consumer asked the payment instructions to be sent to.

details
object | null

An object with SEPA Direct Debit details.

transferReference
string

Transfer reference used by Mollie to identify this payment.

creditorIdentifier
string

The creditor identifier indicates who is authorized to execute the payment. In this case, it is a reference to Mollie.

consumerName
string

Optional – The consumer's name.

consumerAccount
string

Optional – The consumer's IBAN.

consumerBic
string

Optional – The consumer's bank's BIC.

dueDate
string

Estimated date the payment is debited from the consumer's bank account, in YYYY-MM-DD format.

signatureDate
string

Only available if the payment has been verified – Date the payment has been signed by the consumer, in YYYY-MM-DD format.

bankReasonCode
string

Only available if the payment has failed – The official reason why this payment has failed. A detailed description of each reason is available on the website of the European Payments Council.

bankReason
string

Only available if the payment has failed – A textual desciption of the failure reason.

endToEndIdentifier
string

Only available for batch transactions – The original end-to-end identifier that you've specified in your batch.

mandateReference
string

Only available for batch transactions – The original mandate reference that you've specified in your batch.

batchReference
string

Only available for batch transactions – The original batch reference that you've specified in your batch.

fileReference
string

Only available for batch transactions – The original file reference that you've specified in your batch.

details
object | null

An object with Bitcoin details.

bitcoinAddress
string

The bitcoin address the bitcoins were transferred to.

bitcoinAmount
string

The amount transferred in BTC.

bitcoinRate
string

The BTC to EUR exchange rate applied to the payment.

bitcoinUri
string

Optional – A URI that is understood by Bitcoin wallet clients and will cause such clients to prepare the transaction. Follows the BIP 21 URI scheme.

qrCode
object

Only available when explicitly included. – A QR code that can be scanned by Bitcoin wallet clients and will cause such clients to prepare the transaction.

details
object | null

An object with PayPal details.

consumerName
string

The consumer's first and last name.

consumerAccount
string

The consumer's email address.

paypalReference
string

PayPal's reference for the transaction, for instance 9AL35361CF606152E.

details
object | null

An object with paysafecard details.

customerReference
string

The consumer identification supplied when the payment was created.

details
object | null

An object with the consumer bank account details.

consumerName
string

Only available if the payment has been completed – The consumer's name.

consumerAccount
string

Only available if the payment has been completed – The consumer's IBAN.

consumerBic
string

Only available if the payment has been completed – The consumer's bank's BIC.

Note that this information is only available one banking day after the payment has been completed.

details
object | null

An object with the consumer bank account details.

consumerName
string

Only available if the payment has been completed – The consumer's name.

consumerAccount
string

Only available if the payment has been completed – The consumer's IBAN.

consumerBic
string

Only available if the payment has been completed – The consumer's bank's BIC.

Note that this information is only available one banking day after the payment has been completed.

details
object | null

An object with the consumer bank account details.

consumerName
string

Only available if the payment has been completed – The consumer's name.

consumerAccount
string

Only available if the payment has been completed – The consumer's IBAN.

consumerBic
string

Only available if the payment has been completed – The consumer's bank's BIC.

details
object

An object with the gift card details.

billingEmail
string

Only available if passed in the API. – The email address of the customer, this will be used for refunding.

voucherNumber
string

The voucher number, with the last four digits masked. When multiple gift cards are used, this is the first voucher number. Example: 606436353088147****

giftcards
array

A list of details of all giftcards that are used for this payment.

issuer
string

The ID of the gift card brand that was used during the payment

amount
decimal

The amount in EURO that was paid from this giftcard.

voucherNumber
string

The voucher number, with the last four digits masked. Example: 606436353088147****

remainderAmount
decimal

Only available if another payment method was used to pay the remainder amount. – The amount in EURO that was paid with another payment method for the remainder amount.

remainderMethod
string

Only available if another payment method was used to pay the remainder amount. – The payment method that was used to pay the remainder amount.

QR codes (optional)

A QR code object with payment method specific values is available for certain payment method if you pass the include details.qrCode to the resource endpoint.

We will add a key qrCode to the details object. The key will contain this object:

height
int

Height of the image in pixels.

width
int

Width of the image in pixels.

src
string

The URI you can use to display the QR code. Note that we can send both data URIs as well as links to HTTPS images. You should support both.

For an implemention guide, see our QR codes guide.

Example

Request code

require_once 'Mollie/API/Autoloader.php';

$mollie = new Mollie_API_Client;
$mollie->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$payment_id = 'tr_WDqYK6vllg';
$payment    = $mollie->payments->get($payment_id);

/*
 * The order ID saved in the payment can be used to load the order and update it's
 * status
 */
$order_id = $payment->metadata->order_id;

if ($payment->isPaid())
{
    /*
     * At this point you'd probably want to start the process of delivering the product
     * to the customer.
     */
}
elseif (! $payment->isOpen())
{
    /*
     * The payment isn't paid and isn't open anymore. We can assume it was aborted.
     */
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "resource": "payment",
    "id": "tr_WDqYK6vllg",
    "mode": "test",
    "createdDatetime": "2017-12-16T14:26:13.0Z",
    "status": "paid",
    "paidDatetime": "2017-12-16T14:30:56.0Z",
    "amount": "35.07",
    "description": "Order 33",
    "method": "ideal",
    "metadata": {
        "order_id": "33"
    },
    "details": {
        "consumerName": "Hr E G H K\u00fcppers en\/of MW M.J. K\u00fcppers-Veeneman",
        "consumerAccount": "NL53INGB0618365937",
        "consumerBic": "INGBNL2A"
    },
    "locale": "nl",
    "profileId": "pfl_QkEhN94Ba",
    "links": {
        "webhookUrl": "https://webshop.example.org/payments/webhook",
        "redirectUrl": "https://webshop.example.org/order/33/"
    }
}