alt

Important information

Please be advised that there will be a scheduled downtime across our API network on November 05 and November 07, 2024. For more information, visit our platform status portal.:
- Scheduled maintenance on November 5, 2024
- Scheduled maintenance on November 7, 2024

Unzer

Check payment details

Check the status, amounts, resources, and transactions related to a payment.

Overview

When you make a charge, authorize or payout call, the Unzer system creates a unique payment resource. This resource contains all the information about the payment, giving you a good overview of its state.

Information included in the payment resource:

  • payment state
  • payment amounts and currency
  • details of all transactions linked to the payment
  • additional resources linked to the payment: customers, baskets, metadata
icon info
Unzer Insights
You can also check a payment’s details through the Unzer Insights platform.

Check payment details

To check payment details, make a GET call to the dedicated /payments endpoint. In the request path, add either the payment ID (paymentId) or the order ID (orderId):

GET https://api.unzer.com/v1/payments/s-pay-1

// or:

GET https://api.unzer.com/v1/payments/merchant-order-1
{

    "id": "s-pay-1",
    "state": {
        "id": 3,
        "name": "partly"
    },
    "amount": {
        "total": "100.0000",
        "charged": "50.0000",
        "canceled": "00.0000",
        "remaining": "50.0000"
    },
    "currency": "EUR",
    "orderId": "merchant-order-1",
    "resources": {
        "customerId": "",
        "paymentId": "s-pay-1",
        "basketId": "",
        "metadataId": "",
        "traceId": "bf4ce634575d479eaaac4e6ad436d95d",
        "typeId": "s-crd-bltpvrcnqeq2"
    },
    "transactions": [
        {
            "date": "2018-09-24 18:01:02",
            "type": "authorize",
            "status": "success",
            "url": "https://api.unzer.com/v1/payments/s-pay-1/authorize/s-aut-1",
            "amount": "100.0000"
        },
        {
            "date": "2018-09-24 18:01:12",
            "type": "charge",
            "status": "success",
            "url": "https://api.unzer.com/v1/payments/s-pay-1/charges/s-chg-1",
            "amount": "50.0000"
        },
        
    ]
}
ParameterTypeDescription
idstringThe payment’s unique ID.
stateObject
state.idintegerThe current payment status code.
state.namestringThe current payment status name.
amountObject
amount.totalstringThe maximum amount for this order.
Initially, this is the amount that was authorized or charged.
The total amount can only be reduced if an authorization was canceled.
amount.chargedstringThe amount transferred from the customer to you.
amount.canceledstringThe amount refunded from you to the customer.
amount.remainingstringThe difference between the total amount and the charged amount.
currencystringISO currency code: For a list of possible codes, see Amounts and Currencies.
orderIdstringA unique order ID that identifies the payment on your side.
resourcesObject
resources.customerIdstringThe ID of the related customers resource.
resources.paymentIdstringId of the payment.
resources.basketIdstringThe ID of the related baskets resource.
resources.metadataIdstringThe ID of the related metadata resource.
resources.traceIdstringThe unique traceId of the transaction. Used for internal API purposes.
resources.typeIdstringThe payment type ID.
transactionsObject
transactions.datestringTransaction date and time.
transactions.typestringTransaction type:
authorize, charge, cancel-authorize, cancel-charge
transactions.statusstringTransaction status:
success, pending, error
transactions.urlstringTransaction resource URL.
transactions.amountstringTransaction amount.

For a reference of the payment resource, refer to the API reference guide.

To learn about possible payment states and payment state flow, see Payment states page.