Get chargeback¶
GET
https://api.mollie.com/v2/payments/*paymentId*/chargebacks/*id*
Retrieve a single chargeback by its ID. Note the original payment’s ID is needed as well.
If you do not know the original payment’s ID, you can use the chargebacks list endpoint.
Parameters¶
Replace paymentId
in the endpoint URL by the payment’s ID, and replace id
by the chargeback’s ID. For example:
/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tp
.
Access token parameters¶
If you are using organization access tokens or are creating an
OAuth app, you have to specify which profile you are retrieving a chargeback for using the
profileId
parameter. Organizations can have multiple profiles for each of their websites. See
Profiles API for more information.
For these authentication methods the optional testmode
parameter is available as well to enable test mode.
pfl_3RkSN1zuPE
.true
to get a chargeback made in test mode. If you omit this parameter, you can only retrieve live mode chargebacks.Response¶
200
application/hal+json
resource
stringchargeback
for this endpoint.id
stringchb_n9z0tp
.amount
amount objectThe amount charged back by the consumer.
currency
stringvalue
stringsettlementAmount
amount objectThis optional field will contain the approximate amount that will be deducted from your account, converted
to the currency your account is settled in. It follows the same syntax as the amount
property.
Note that for chargebacks, the value
key of settlementAmount
will be negative.
Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal chargebacks.
Please note that this amount might be recalculated and changed when the status of the chargeback changes. We suggest using the List balance transactions endpoint instead to get more accurate settlement amounts for your chargebacks.
currency
stringvalue
stringcreatedAt
datetimereason
objectReason for the chargeback as given by the bank.
Note
This field will only be returned for chargebacks where direct debit was used as the original payment method.
code
stringdescription
stringreversedAt
datetimepaymentId
stringtr_7UhSN1zuXS
. The full payment
object can be retrieved via the payment
URL in the _links
object._links
objectAn object with several URL objects relevant to the chargeback. Every URL object will contain an href
and a
type
field.
self
URL objectpayment
URL objectsettlement
URL objectoptionaldocumentation
URL objectExample¶
1 2 | curl -X GET https://api.mollie.com/v2/payments/tr_WDqYK6vllg/chargebacks/chb_n9z0tp \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
1 2 3 4 5 6 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); $payment = $mollie->payments->get("tr_WDqYK6vllg"); $chargeback = $payment->getChargeback("chb_n9z0tp"); |
1 2 3 4 5 6 7 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") payment = mollie_client.payments.get("tr_WDqYK6vllg") chargeback = payment.chargebacks.get("chb_n9z0tp") |
1 2 3 4 5 6 7 8 9 10 | require 'mollie-api-ruby' Mollie::Client.configure do |config| config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' end chargeback = Mollie::Payment::Chargeback.get( 'chb_n9z0tp', payment_id: 'tr_WDqYK6vllg' ) |
1 2 3 4 5 6 | const { createMollieClient } = require('@mollie/api-client'); const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' }); const chargeback = await mollieClient.paymentChargebacks.get('chb_n9z0tp', { paymentId: 'tr_WDqYK6vllg' }); |
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 | HTTP/1.1 200 OK Content-Type: application/hal+json { "resource": "chargeback", "id": "chb_n9z0tp", "amount": { "currency": "USD", "value": "43.38" }, "settlementAmount": { "currency": "EUR", "value": "-35.07" }, "createdAt": "2018-03-14T17:00:52.0Z", "reason": { "code": "AC01", "description": "Account identifier incorrect (i.e. invalid IBAN)" }, "reversedAt": null, "paymentId": "tr_WDqYK6vllg", "_links": { "self": { "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/chargebacks/chb_n9z0tp", "type": "application/hal+json" }, "payment": { "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback", "type": "text/html" } } } |