---
title: "Issue Reward"
method: POST
path: "/api/v1/rewards"
tags: ["Rewards"]
---

# Issue Reward

`POST /api/v1/rewards`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/rewards`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/rewards/post.ts> (a function with typed inputs; its response is checked against the schema)

Issue a reward to a recipient identified by phone number. If the recipient has exactly one active wallet, the reward is credited immediately (`kind: immediate`, `status: Credited`). Otherwise, if no blocking wallet exists, a pre-issued reward is created (`kind: preIssued`, `status: Created`). All responses use the unified `Reward` resource type. Requires an `idempotencyKey`. Retries are safe when the full request body is unchanged — the API fingerprints the body server-side and replays the prior result for matching key + fingerprint pairs.

## Headers

- `Client-ID` string, uuid, required: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
- `Authorization` string, uuid, required: Secure secret to access privileged endpoints.

## Request body

- object
  - `data` IssueRewardRequest, required: Request to issue a reward to a phone number.
    - `type` 'IssueReward', required
    - `attributes` object, required
      - `phoneNumber` string, required: Recipient phone number in E.164 or supported national format.
      - `amount` integer, required: Reward amount in cents. Must be a positive integer.
      - `idempotencyKey` string, required: Required idempotency key (1–255 characters). Idempotency is scoped to this key plus a server-computed SHA-256 fingerprint of the normalized phone number, amount, and optional metadata fields (`message`, `reasonCode`, `costCenter`, `notificationEmail`). Reusing the same key with an identical request body returns the original result. Reusing the key with any change to those fields returns `409 IdempotencyConflict`.
      - `message` string: Optional message shown to the recipient.
      - `reasonCode` string: Partner-defined reason code.
      - `costCenter` string: Partner-defined cost center.
      - `notificationEmail` string, email: Email to notify when a pre-issued reward is claimed.

## Response `200`

Reward issued successfully. Response is always `type: Reward`; use `kind`, `status`, and capability flags to interpret the outcome.

- IssueRewardResponse
  - `data` RewardResponse, required: Unified reward resource for both immediate wallet credits and pre-issued rewards awaiting claim.
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'Reward', required
    - `attributes` object, required
      - `kind` 'immediate' | 'preIssued', required: Informational discriminator only. Use `canUpdate` and `canCancel` to decide which operations are allowed — do not branch behavior on `kind` alone.
      - `amount` integer, required: Reward amount in cents.
      - `walletId` string, uuid, nullable, required: Wallet that received the reward. Set for immediate credits; `null` for pre-issued rewards awaiting claim.
      - `status` 'Credited' | 'Created' | 'Claimed' | 'Expired' | 'Cancelled', required: Unified lifecycle status. Immediate wallet credits are `Credited`; pre-issued rewards use `Created`, `Claimed`, `Expired`, or `Cancelled`.
      - `canUpdate` boolean, required: Whether `PATCH /api/v1/rewards/{id}` is allowed for this reward.
      - `canCancel` boolean, required: Whether `DELETE /api/v1/rewards/{id}` is allowed for this reward.
      - `claimExpiresAt` string, date-time, nullable, required: When a pre-issued reward must be claimed before it expires. `null` for immediate wallet credits.
      - `message` string, nullable, required: Optional message attached to the reward.
      - `reasonCode` string, nullable, required: Partner-defined reason code for reporting and reconciliation.
      - `costCenter` string, nullable, required: Partner-defined cost center for reporting.
      - `notificationEmail` string, email, nullable, required: Email address to notify when a pre-issued reward is claimed.

## Other responses

- `400`: Validation error or unresolvable recipient
- `409`: Conflict — wallet not issuable, pre-issued exists, or idempotency mismatch
- `500`: Internal Server Error

---

[API](https://skmtc.dev/byaccrue/apis/accrue-merchant-api.md) - [All operations](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/revisions/3e2d97ef2e6e?raw)
