...
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).
Order can be updated (e.g. amount adjusted Update Order endpoint) and the result is based on the status of the related payment resource:
when payment has not been initialized yet - order and related payment is updated
when payment has been processed already - new payment is created and added to order
Once the order is created, it can be further processed by one of two flows:
...
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 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:
when payment has not been initialized yet - order and related payment is updated
when payment has been processed already - new payment is created and added to order
Also, the refund limit can be updated for an order.
Request
HTTP headers
Request must contain following headers.
Header | Type | Description |
---|---|---|
Authorization | Bearer token | Authorization token to access API. |
Body
Field | Type | Optional |
---|---|---|
amount | number (0.01 - 9999999999) | yes |
refundLimitPercentage | Valid positive number (Integer or floating up to 2 decimals) or zero | yes |
Error codes
Following error codes can be returned if the request fails:
code | description |
---|---|
INVALID_ORDER_AMOUNT | The requested amount is lower than the sum of paid payments |
ORDER_CANNOT_BE_UPDATED | The order’s amount is not updatable at the moment - payment might be processing. Only refundLimitPercentage is updatable when the payment is processing. |