Skip to content

Issue store credit

Request

Onward is requesting store credit to be issued for a specific Order in your platform.

Security
api_key
Path
shopOrderIdstringrequired

Your ID for the Order

Headers
Content-Typestringrequired

Content-Type must be application/json

Example:application/json
Acceptstringrequired

Accept must be application/json

Example:application/json
Bodyapplication/json
customerobjectrequired
to_issue_amountobjectrequired

Amount to refund in the specified currency

curl -i -X POST \
  'https://api.your-store.com/onward/orders/{shopOrderId}/store_credit' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "customer": {
      "first_name": "string",
      "last_name": "string",
      "email": "user@example.com",
      "phone_number": "string"
    },
    "to_issue_amount": {
      "currency": "USD",
      "cents": 1099
    }
  }'

Responses

Store credit issued successfully

Bodyapplication/json
shop_store_credit_codestringrequired

The customer-facing code for the store credit

Example:"GC123456"
shop_store_credit_idstringrequired

Your internal ID for the store credit

Example:"SC789"
initial_valueobjectrequired

Initial balance of this store credit

balanceobjectrequired

Current balance of this store credit

notestring

Any note for this store credit

Response
{ "shop_store_credit_code": "GC123456", "shop_store_credit_id": "SC789", "initial_value": { "currency": "USD", "cents": 1099 }, "balance": { "currency": "USD", "cents": 1099 }, "note": "string" }