The order resource in Everifin Paygate API tries to reflect merchant’s order (in most cases there is relationship: one order - one payment, but some merchants have concept of orders with possibility of multiple payments - customers can add items to the same order later when some items of the order were already paid).
Info |
---|
In case you do not need scenario of multiple successful payments for one order (majority of online businesses use relation 1:1), Order entity is not important to you and you should focus only on payment entity. However, you do need to store the order ID upon posting the payment order as it is needed for the request URL to get the payment detail and status. |
All available endpoints related to orders and payments are described here: Orders API
Order initialization
The payment process starts with creating the payment order. There is one related payment resource created automatically with each new order (amount is equal as the amount of the whole order).
Once the order is created, it can be further processed by Redirect flow (using Everifin GUI).
All available endpoints related to orders are described here: Orders API
Order initialization
In order initialization you send the information about the order and its first payment to Everifin. Everifin responds with an order ID, processable payment ID and redirect link pointing to Everifin Paygate page.
...
Code Block |
---|
200: { "meta": { "status": "SUCCESS" }, "data": { "id": "bf4f2fa8-9426-441d-b450-67a5c801a9ef", "processablePaymentId": "372f9684-184b-437b-b974-e3331bbc879a", "link": "{{redirect-to-everifin}}", "status": "UNPAID" } } |
Order’s payment detail
To get information about order’s payment and it's status, Get Order Payment endpoint can be used. List of possible statuses can be found here: https://everifin.atlassian.net/wiki/spaces/EPAD/pages/2467561491/Paygate+Payment+Flow#Payment-statuses.
Endpoint Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#99db82cc-ce02-46a8-a92a-072dea0a60b7
List of all payments
To search payments, use the Get Payments endpoint.
See the Postman documentation for instructions how to use this endpoint - filtering, sorting and pagination is supported.
Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#8ba9728a-e31a-4984-9b5a-4195a8558283
Order detail
In case you use concept of one order - one payment in your online business (i.e. not allowing to add multiple successful payments for one order), you should work with payment entity and skip to next paragraph to find out how to get status of the payment.
Order detail endpoint can be used to get the order data and status. Possible statuses can be found here:
https://everifin.atlassian.net/wiki/spaces/EPAD/pages/2467561491/Paygate+Payment+Flow#Order-statuses.
The response already contains list of payments and refunds for the order.
Endpoint Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#f80d920b-4016-4c77-855a-e616dcb166be
List of all orders
To search orders, use the Search Orders endpoint.
See the Postman documentation for instructions how to use this endpoint - filtering, sorting and pagination is supported.
Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#2cb3f925-60c6-47c0-ac9f-2affdb218473
Order update
Order can be updated (e.g. amount adjusted Update Order endpoint) and the result is based on the status of the related payment resource:
...
code | description |
---|---|
ORDER_CANNOT_BE_WITHDRAWN | Order’s state does not allow to withdraw it. Payment might be processing at the moment or was already processed. |
Order detail
Order detail endpoint can be used to get the order data and status. Possible statuses can be found here:
https://everifin.atlassian.net/wiki/spaces/EPAD/pages/2467561491/Paygate+Payment+Flow#Order-statuses.
The response already contains list of payments and refunds for the order.
Endpoint Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#f80d920b-4016-4c77-855a-e616dcb166be
Order’s payment detail
To get information about order’s payment and it's status, Get Order Payment endpoint can be used.
Endpoint Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#99db82cc-ce02-46a8-a92a-072dea0a60b7
List of all orders
...
. |
...
See the Postman documentation for instructions how to use this endpoint - filtering, sorting and pagination is supported.
Documentation: https://documenter.getpostman.com/view/21056419/2s9Y5Ww3LU#2cb3f925-60c6-47c0-ac9f-2affdb218473
List of all payments
To search payments, use the Get Payments endpoint.
See the Postman documentation for instructions how to use this endpoint - filtering, sorting and pagination is supported.
...