Skip to main content

Reauthorize order

Order items that not yet been captured can be changed with the reauthorize endpoint. Already captured items won't be affected by the reauthorize call.

Please note

This can only be done on orders with status NotActivated or PartActivated.

Example​

POST /manage/orders/{{orderId}}/reauthorize HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...

{
"amount": 285.0,
"actionReference": "test-captureref-123",
"items": [
{
"id": "10001",
"description": "Shoes",
"unitPrice": 95,
"quantity": 1
},
{
"id": "10002",
"description": "T-Shirt",
"unitPrice": 95,
"quantity": 2
}
]
}

Data Model​

Request​

Request headers​
HeaderRequiredExplanation
AuthorizationYesInstructions on how to generate the Bearer token value can be found here
Request body​
PropertyRequiredExplanation
amountYesThe new amount to authorize. Must match provided total summary of order items, if order items are provided.
descriptionNoA description for the reuthorization. This will be used as description if no order items is provided.
actionReferenceNoA reference to this specific reauthroize.
itemsNoThe article items and quantity to authorize.

If you are doing a authorize with items, you will have to provide items in the request.

Response​

The response will be 202 Accepted for a successful reauthorization.

Please note

Due to the asynchronous nature of an Accepted status answer, it can take a few seconds before the update can be shown in various systems and responses to API requests. You should design your system to accomodate this.

Error codes​

CodeMessage
ORDER_ALREADY_CAPTUREDYou cannot reauthorize an already fully refunded order
MATCHING_ARTICLES_WITH_DIFFERENT_VATIdentical articles with mismatched VAT
ARTICLE_EXISTS_BUT_OTHER_INFORMATIONIdentical articles with mismatched unit price
REAUTHORIZE_ORDER_INCREASE_ABOVE_CURRENT_TOTAL_AMOUNT_IS_NOT_ALLOWEDTotal amount must be less than or equal to original amount
REAUTHORIZE_AMOUNT_MUST_BE_GREATER_THAN_ZEROTotal amount must be positive
REAUTHORIZE_AMOUNT_MUST_MATCH_SUM_OF_ARTICLESTotal amount must match article amount
Idempotency

To prevent multiple requests by mistake, the idempotency header can be used to single out requests. The API supports idempotency for safely retrying requests that only should be performed once. This could be useful if responses are not received due to network connectivity problems. For example, if a response for a request to add an invoice is not received, you can retry the request with the same idempotency key again and be guaranteed that no more than one invoice is added.

You will need to generate a guid/uuid v4 and send it in with the header x-idempotency for every unique operation:

X-idempotency: 03304b06-cb33-4f78-bcea-86cb4b202ba0