Skip to content

Refund an order's protection

Request

Onward is requesting a refund of the Onward protection premium for the specified Order in your platform, for example when a customer opts out of protection.

Security
api_key
Path
shopOrderIdstringrequired

Your ID for the Order

Example:18282
Headers
Content-Typestringrequired

Content-Type must be application/json

Example:application/json
Acceptstringrequired

Accept must be application/json

Example:application/json
Bodyapplication/json
protection_amountobject(Money)required

The Onward protection premium to refund, in the shop's currency

curl -i -X POST \
  https://api.your-store.com/onward/orders/18282/refund_protection \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "protection_amount": {
      "cents": 1299,
      "currency": "USD"
    }
  }'

Responses

Protection refunded successfully

Bodyapplication/json
shop_refund_idstringrequired

Your ID for the refund

Example:"123456"
Response
{ "shop_refund_id": "123456" }