Get payment
This operation can be used to get payment status in case you are not using hooks.
Request
Code Block |
---|
GET {everifin_url}/api/v1/payments/:id |
Response - successful payment
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": { "id": {{:id}} "instructionId": "ABCD11234", "amount" : 1.05, "currency": "EUR", "recipientIban": "SK132465798132456", "recipientName": "The best e-shop in the world", "variableSymbol": "0000000001", "constantSymbol": "0308", "specificSymbol": "0000000003", "reference": null, "redirectUrl": "https://thebesteshopintheworld.com", "paymentMessage": "Payment for The best eshop", "status": "FINISHED" } } |
Response - failed payment
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": { "id": {{:id}} "instructionId": "ABCD11234", "amount" : 1.05, "currency": "EUR", "recipientIban": "SK132465798132456", "recipientName": "The best e-shop in the world", "variableSymbol": "0000000001", "constantSymbol": "0308", "specificSymbol": "0000000003", "reference": null, "redirectUrl": "https://thebesteshopintheworld.com", "paymentMessage": "Payment for The best eshop", "status": "FAILED", "errorCode": "INSUFFICIENT_AMOUNT" } } |
Get payments
To get list of payments, you can use this operation. Getting multiple payments requires pagination and supports filtering and sorting.
Request
Code Block |
---|
GET {everifin_url}/api/v1/payments?page=1&countPerPage=5&sort=id:asc |
Filter
Field | Type | Description |
---|---|---|
id | UUID | Id of the payment |
instructionId | text | Your id of the payment |
recipientIban | IBAN | Your bank account IBAN |
senderBankId | text | Sender`s (Payer`s) bank id |
amount | number range | Amount of the payment defined in a number range |
currency | text | Currency code of the payment |
variableSymbol | numeric text | Variable symbol of the payment |
specificSymbol | numeric text | Specific symbol of the payment |
constantSymbol | numeric text | Constant symbol of the payment |
reference | text | Payment reference |
paymentMessage | text | Payment message |
status | enum | Payment status |
Sorting
Sorting by following fields is supported
id
instructionId
amount
currency
senderBankId
variableSymbol
specificSymbol
constantSymbol
reference
paymentMessage
status
recipientIban
Response
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": [{ "id": "ABC1" "instructionId": "ABCD11234", "amount" : 1.05, "currency": "EUR", "recipientIban": "SK132465798132456", "variableSymbol": "0000000001", "constantSymbol": "0308", "specificSymbol": "0000000003", "redirectUrl": "https://thebesteshopintheworld.com", "paymentMessage": "Payment for The best eshop", "status": "FINISHED" }, { "id": "ABC2" "instructionId": "ABCD11235", "amount" : 1100.50, "currency": "EUR", "recipientIban": "SK132465798132456", "variableSymbol": "0000000002", "constantSymbol": "0308", "specificSymbol": "0000000003", "redirectUrl": "https://thebesteshopintheworld.com", "status": "FAILED", "errorCode": "INSUFFICIENT_AMOUNT" }] } |
Payment update
Payment data can be changed in case payment state allows it. Payment data cannot be changed for:
finalized payments (successful or failure)
user has already opened link to Everifin Paygate web page in redirect flow (payment status = SEEN)
user has already started the payment authorization on the bank side (payment status = PROCESSING)
Request
Fields are same as in payment initialization.
Code Block |
---|
PUT {everifin_url}/api/v1/payments/:id { "instructionId": "XXX", "amount" : 1.05, "currency": "EUR", "recipientIban": "SK132465798132456", "recipientName": "The best e-shop in the world", "variableSymbol": "0000000001", "constantSymbol": "0308", "specificSymbol": "0000000003", "reference": null, "redirectUrl": "https://thebesteshopintheworld.com", "paymentMessage": "Payment for The best eshop", "hookData": {} // your hook data } |
Response
Response is identical to response in payment initialization.
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": { "id": {{:id}} "instructionId": "XXX", "amount" : 1.05, "currency": "EUR", "recipientIban": "SK132465798132456", "recipientName": "The best e-shop in the world", "variableSymbol": "0000000001", "constantSymbol": "0308", "specificSymbol": "0000000003", "reference": null, "redirectUrl": "https://thebesteshopintheworld.com", "paymentMessage": "Payment for The best eshop", "status": "FINISHED", "hookData": {} // your hook data } } |
Withdraw payment
You can withdraw (invalidate / cancel) the payment by calling Everifin Paygate endpoint with DELETE method. Payment cannot be invalidated for finalized payments (successful or failure) and also in case user already started the payment authorization on bank side.
Request
Code Block |
---|
DELETE {everifin_url}/api/v1/payments/:id |
Response
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": { "id": {{:id}}, "status": "WITHDRAWN" } } |