Check Status and Amount of a Payment
The following endpoint is intended to be used for checks immediately before a cancellation, or to be called after receiving a push notification for the Payment Transaction.
Due to full and partial cancellations or refunds, it can be cumbersome to determine the effective amount the customer has to pay. The API endpoint to obtain the current status and the effective amount is GET /api/v2/Payment/Transactions/{id}/checkStatus.
GET /api/v2/Payment/Transactions/PCI_AEVDQO42JC3YHO4PSAZ3CQJU4S0P5A/checkStatus HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
The request needs no body. Instead of the secuconnect ID (PCI_xyz), you can also pass the Flex.API hash (like cq1we...).
If everything is fine, the API responds with 200 OK and these details:
{
"status"
: 9,
"status_text"
:
"vorautorisiert"
,
"status_simple"
: 2,
"status_simple_text"
:
"authorized"
,
"amount"
: 8600,
"currency"
:
"EUR"
}
The fields are:
Field |
Type |
Meaning |
status |
int |
Status ID |
status_text |
string |
Status text (translated) |
status_simple |
int |
Simple status ID:
|
status_simple_text |
string |
Simple status text (English) |
amount |
int |
Effective amount of the transaction including refunds. Like all monetary amounts, it is rendered in the smallest currency unit, e. g. Euro Cents. Zero (0), when the transaction has been completely cancelled. Otherwise the current transaction amount minus all promising or completed refund transactions. Imagine this progress:
You would find:
|
currency |
string |
ISO 4217 currency code such as EUR, CHF, GBP or USD. |