Globagift Docs
API / Developers

Redemptions

Spend card balance at a signed acceptance point and list redemptions.

GET
/v1/redemptions

Authorization

bearerAuth
headerAuthorizationBearer <token>

A merchant API key (gg_...). Each key is limited to its granted scopes.

Query Parameters

after_cursor?string
limit?integer
Range1 <= value <= 100
Default50
card_id?string
Formatuuid
acceptance_point_id?string
Formatuuid
redeemed_from?string

Inclusive date/time boundary for the resource timestamp named by this parameter.

Formatdate-time
redeemed_to?string

Inclusive date/time boundary for the resource timestamp named by this parameter.

Formatdate-time

Response Body

Redemptions page

application/json
  1. response
data?array<>
next_cursor?string|null
Example Request
curl -X GET 'https://engine-sandbox.globagift.io/v1/redemptions'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "card_id": "66f6e46c-f6a1-4af8-a1bd-49666bc01304",      "acceptance_point_id": "cb7fe03a-d13a-4fa6-9fe2-dcdbba794774",      "amount": 0,      "currency": "string",      "created_at": "2019-08-24T14:15:22Z",      "reversed": true    }  ],  "next_cursor": "string"}
POST
/v1/redemptions

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.

Authorization

signedAcceptancePoint
headergg-signature<token>

HMAC-SHA256 signature, in hex, of METHOD, PATH, TIMESTAMP, the hex SHA-256 of the raw body and NONCE joined by newlines, keyed with an acceptance-point credential secret. Send it with the gg-credential, gg-timestamp and gg-nonce headers.

Header Parameters

Idempotency-Key*string
Length1 <= length <= 255
gg-credential*string
gg-timestamp*string
gg-nonce*string
gg-signature*string

Request Body

application/json
  1. body
code*string
Length8 <= length <= 64
amount*integer
Range1 <= value <= 1000000000000

Response Body

Redemption created (200 on idempotent replay)

application/json
  1. response
id*string
card_id*string
amount*number
remaining_balance*number
card_state*string
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/redemptions' \  -H 'Idempotency-Key: string' \  -H 'gg-credential: string' \  -H 'gg-timestamp: string' \  -H 'gg-nonce: string' \  -H 'gg-signature: string' \  -H 'Content-Type: application/json' \  -d '{  "code": "stringst",  "amount": 1}'
Example Response
{  "id": "string",  "card_id": "string",  "amount": 0,  "remaining_balance": 0,  "card_state": "string"}