# Redemptions

Source: https://docs.globagift.io/docs/api/reference/redemptions
Description: Spend card balance at a signed acceptance point and list redemptions.


## Redeem a card at a signed acceptance point

`POST /v1/redemptions`

Authentication: Signed acceptance-point request (`gg-credential`, `gg-timestamp`, `gg-nonce`, `gg-signature`)

Retries: send an Idempotency-Key header. Repeating the request with the same key and the same body returns the original result; the same key with a different body returns 409 idempotency_key_conflict.

Parameters:

- `Idempotency-Key` (header, required, string)
- `gg-credential` (header, required, string)
- `gg-timestamp` (header, required, string)
- `gg-nonce` (header, required, string)
- `gg-signature` (header, required, string)

Request body:

- `code` (string, required)
- `amount` (integer, required)

Responses:

- 201: Redemption created (200 on idempotent replay)
- 400: Idempotency key missing
- 401: Acceptance point signature verification failed
- 404: Not found
- 409: Idempotency key conflict
- 422: Insufficient balance or card not redeemable
- default: Unexpected server error

## List redemptions with cursor pagination and composable filters

`GET /v1/redemptions`

Authentication: Merchant API key (`Authorization: Bearer gg_...`)

Parameters:

- `after_cursor` (query, string)
- `limit` (query, integer)
- `card_id` (query, string (uuid))
- `acceptance_point_id` (query, string (uuid))
- `redeemed_from` (query, string (date-time)): Inclusive date/time boundary for the resource timestamp named by this parameter.
- `redeemed_to` (query, string (date-time)): Inclusive date/time boundary for the resource timestamp named by this parameter.

Responses:

- 200: Redemptions page
- 400: Validation failed
- 401: Authentication failed
- 403: Authenticated caller lacks permission or the account is unavailable
- default: Unexpected server error
