Check the Payment Status

We recommend to check the status of the Payment Transaction, after the customer was directed back to your success URL or after a status callback.

The API endpoint to obtain the status of a direct debit transaction is GET /api/v2/Payment/Secupaydebits/{id}. A request body is not needed. since it is a GET request:

Request
GET /api/v2/Payment/Secupaydebits/xtfartvfmdtn4877185 HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Accept: application/json

The API responds with the representation of the Payment Transaction:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "payment.secupaydebits",
"id": "xtfartvfmdtn4877185",
"trans_id": "28766795",
"status": "accepted",
"amount": "6800",
"currency": "EUR",
"purpose": "Travel club 5P fee 2020/09/10-2020/10/09",
"order_id": null,
"transaction_status": "11",
"customer": {
"object": "payment.customers",
"id": "PCU_38RG7MHRE2NJTPFMXRYQP3NKW6GVAZ",
"merchant": {
"object": "general.merchants",
"id": "MRC_7NVWYD9A25ZDMYB320FZHBB9GFWKO5"
},
"contact": {
"salutation": "Mr.",
"forename": "Max",
"surname": "Mustermann",
"address": {
"street": "Max-Muster-Str.",
"street_number": "25a",
"postal_code": "09555",
"city": "Musterstadt",
"country": "DE",
"additional_address_data": "Whg. 202"
},
"email": "mmustermann@example.net",
"mobile": "+49 177 5555555",
"phone": "+49 555 5555555"
},
"created": "2020-09-08T14:36:17+02:00"
},
"used_payment_instrument": {
"type": "bank_account",
"data": {
"owner": "",
"iban": "DE02 XXXX XXXX 2051",
"bic": "BYLADEM1001",
"bankname": "Deutsche Kreditbank Berlin"
}
},
"mandate": {
"identification": "OTM/A50BL8OR64E86IA06",
"creditor_id": "DE17ZZZ00000011109"
}
}

When the field status contains accepted, everything is fine.

Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).

Please also respond to later status changes, signalized by the callback API. A payment may also fail after it was accepted.