Annull an order for a specific merchant.
This operation enables you to:
When you annull an order you send which orderId it refers to and the below attributes:
To annull a specific order you have to send the above attributes, via a server-side call to our REST API. You’ll find the complete REST API reference here.
POST /v1/orders/<orderId>/transactions
x-api-key: njdfdsdkjfl5598503mnfkfe
x-merchant-key: 86969769
Content-Type: application/json
{
"type":"ANNULL",
"amount":15000,
"transactionReference":"transRef100",
"message":"TestMessage",
"rows":[
{
"name":"Vit T-shirt",
"quantity":1.0,
"unitAmount":15000,
"vatRate":2500,
"partNumber":"00012",
"description":"Bomull vit",
"unit":"st",
"discountAmount":0,
"serials":[],
"fee":false,
"provided":false
}
]
}
The response will either be OK or an error code.
The response contains following information:
You can see all Ecster's custom objects here
Below you have an example of the response from the request obove.
Status: 201 Created
{
"orderStatus": "ANNULLED",
"transaction": {
"id": "WVJAGSdOx6AlQEbByU9N",
"transactionReference": "transRef100",
"type": "ANNUL",
"created": "2018-12-16T21:15:59+01:00",
"amount": 0,
"rows": [
{
"name": "Vit T-shirt",
"quantity": 1,
"unitAmount": 15000,
"vatRate": 2500,
"partNumber": "00012",
"description": "Bomull vit",
"unit": "st",
"discountAmount": 0,
"serials": [],
"fee": false
}
],
"message": "TestMessage",
"merchantId": "69260825"
}
}