Skip to content

Issue a reward

Request

Onward is requesting a reward to be issued for the specified Customer in your platform, for example when an order earns cashback. One request is sent per credit.

Security
api_key
Path
shopCustomerIdstringrequired

Your ID for the Customer

Example:7461
Headers
Content-Typestringrequired

Content-Type must be application/json

Example:application/json
Acceptstringrequired

Accept must be application/json

Example:application/json
Bodyapplication/json
customerobject(Customer)required
to_issue_amountobject(Money)required

Amount to credit, in the shop's currency

onward_reward_transaction_idinteger, (int64)required

Our ID for this specific credit. Stable across retries — a repeated request with the same value should return the same shop_transaction_id rather than issuing a second credit.

Example:456001
curl -i -X POST \
  https://api.your-store.com/onward/customers/7461/reward \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "customer": {
      "shop_customer_id": "7461",
      "first_name": "Sally",
      "last_name": "Loo",
      "email": "sally@example.com",
      "phone_number": "+13105551234"
    },
    "to_issue_amount": {
      "cents": 1299,
      "currency": "USD"
    },
    "onward_reward_transaction_id": 456001
  }'

Responses

Reward issued successfully

Bodyapplication/json
shop_transaction_idstringrequired

Your ID for this credit

Example:"rw_789"
shop_reward_idstringrequired

Your ID for the redemption method (discount code, store credit, etc) the credit was added to. Onward stores it on the customer's reward.

Example:"1234567890"
Response
{ "shop_transaction_id": "rw_789", "shop_reward_id": "1234567890" }