Globagift Docs
API / Developers

Cards

Issue gift cards, read them, and suspend, release or void them.

GET
/v1/cards

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
state?string
Value in"created""active""partially_redeemed""depleted""suspended""fraud_hold""expired""voided"
issued_from?string

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

Formatdate-time
issued_to?string

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

Formatdate-time
order_id?string
Formatuuid
recipient_email?string
last4?string

Response Body

Cards page

application/json
  1. response
data*array<>
next_cursor*|null
Example Request
curl -X GET 'https://engine-sandbox.globagift.io/v1/cards'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "state": "created",      "currency": "EUR",      "amount": 0,      "claim_code": "string",      "redemption_code": "string",      "payment_reference": "string",      "acceptance_point_id": "cb7fe03a-d13a-4fa6-9fe2-dcdbba794774",      "whatsapp_delivery": {        "sent": true,        "to_masked": "string",        "reason": "string"      },      "email_delivery": {        "sent": true,        "to_masked": "string",        "reason": "string"      },      "redemption_code_last4": "stri",      "expires_at": "2019-08-24T14:15:22Z",      "card_design_id": "e9676ab8-4ee1-4a63-b3d4-c9176075bb1b",      "artwork_url": "http://example.com",      "balance": 0,      "issued_at": "2019-08-24T14:15:22Z",      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"    }  ],  "next_cursor": "a7ec8888-a9c3-4732-a281-9a08510f220b"}

Issue a gift card

POST
/v1/cards

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

bearerAuth
headerAuthorizationBearer <token>

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

Header Parameters

Idempotency-Key*string
Length1 <= length <= 255

Request Body

application/json
  1. body
card_product_id*string
amount*integer
Range1 <= value <= 1000000000000
recipient_email?string

Required when delivery_channel is email. The gift card is emailed to this address.

Lengthlength <= 320
payment_reference?string

Optional store payment reference for till reconciliation.

Lengthlength <= 80
acceptance_point_id?string

Optional store or till that issued the card.

Formatuuid
recipient_phone?string

E.164 phone. Required when delivery_channel is whatsapp.

Lengthlength <= 32
delivery_channel?string

How to deliver the card. Default qr, or email when recipient_email is set.

Value in"qr""email""whatsapp"
whatsapp_consent?boolean

Must be true when delivery_channel is whatsapp (Meta opt-in).

Response Body

Card issued (200 on idempotent replay)

application/json
  1. response
id*string
Formatuuid
state*string
Value in"created""active""partially_redeemed""depleted""suspended""fraud_hold""expired""voided"
currency*string
Match^[A-Z]{3}$
amount*integer

Integer minor units; for example 1250 means EUR 12.50.

Range0 <= value
payment_reference?string

Optional store payment reference returned at issue time when supplied.

Lengthlength <= 80
acceptance_point_id?|

Optional store or till that issued the card. Null when issue had no till context.

whatsapp_delivery?
email_delivery?
redemption_code_last4*|null
expires_at*|null
card_design_id*|null
artwork_url*|null
balance*|null
issued_at?string
Formatdate-time
order_id?|null
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/cards' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "card_product_id": "string",  "amount": 1}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "state": "created",  "currency": "EUR",  "amount": 0,  "claim_code": "string",  "redemption_code": "string",  "payment_reference": "string",  "acceptance_point_id": "cb7fe03a-d13a-4fa6-9fe2-dcdbba794774",  "whatsapp_delivery": {    "sent": true,    "to_masked": "string",    "reason": "string"  },  "email_delivery": {    "sent": true,    "to_masked": "string",    "reason": "string"  },  "redemption_code_last4": "stri",  "expires_at": "2019-08-24T14:15:22Z",  "card_design_id": "e9676ab8-4ee1-4a63-b3d4-c9176075bb1b",  "artwork_url": "http://example.com",  "balance": 0,  "issued_at": "2019-08-24T14:15:22Z",  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"}

Get a single card

GET
/v1/cards/{id}

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string

Response Body

Card

application/json
  1. response
id*string
Formatuuid
state*string
Value in"created""active""partially_redeemed""depleted""suspended""fraud_hold""expired""voided"
currency*string
Match^[A-Z]{3}$
amount*integer

Integer minor units; for example 1250 means EUR 12.50.

Range0 <= value
payment_reference?string

Optional store payment reference returned at issue time when supplied.

Lengthlength <= 80
acceptance_point_id?|

Optional store or till that issued the card. Null when issue had no till context.

whatsapp_delivery?
email_delivery?
redemption_code_last4*|null
expires_at*|null
card_design_id*|null
artwork_url*|null
balance*|null
issued_at?string
Formatdate-time
order_id?|null
Example Request
curl -X GET 'https://engine-sandbox.globagift.io/v1/cards/string'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "state": "created",  "currency": "EUR",  "amount": 0,  "claim_code": "string",  "redemption_code": "string",  "payment_reference": "string",  "acceptance_point_id": "cb7fe03a-d13a-4fa6-9fe2-dcdbba794774",  "whatsapp_delivery": {    "sent": true,    "to_masked": "string",    "reason": "string"  },  "email_delivery": {    "sent": true,    "to_masked": "string",    "reason": "string"  },  "redemption_code_last4": "stri",  "expires_at": "2019-08-24T14:15:22Z",  "card_design_id": "e9676ab8-4ee1-4a63-b3d4-c9176075bb1b",  "artwork_url": "http://example.com",  "balance": 0,  "issued_at": "2019-08-24T14:15:22Z",  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe"}
GET
/v1/pos/cards/lookup

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Query Parameters

code*string
Length4 <= length <= 200

Response Body

Card balance and status for the POS terminal

application/json
  1. response
code*string
balance*number

Remaining balance in minor units

currency*string
status*string|null
card_id*string|null
value_initial*number|null
product_name*string|null
merchant_name*string|null
expires_at*string|null
Example Request
curl -X GET 'https://engine-sandbox.globagift.io/v1/pos/cards/lookup?code=string'
Example Response
{  "code": "string",  "balance": 0,  "currency": "string",  "status": "string",  "card_id": "string",  "value_initial": 0,  "product_name": "string",  "merchant_name": "string",  "expires_at": "string"}

Suspend a card

POST
/v1/cards/{id}/suspend

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string

Response Body

Card suspended

application/json
  1. response
id?string
state?string
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/cards/string/suspend'
Example Response
{  "id": "string",  "state": "string"}

Release a suspended card

POST
/v1/cards/{id}/release

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string

Response Body

Card released

application/json
  1. response
id?string
state?string
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/cards/string/release'
Example Response
{  "id": "string",  "state": "string"}

Void a card

POST
/v1/cards/{id}/void

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Path Parameters

id*string

Response Body

Card voided

application/json
  1. response
id?string
state?string
Example Request
curl -X POST 'https://engine-sandbox.globagift.io/v1/cards/string/void'
Example Response
{  "id": "string",  "state": "string"}