Skip to main content
POST
Create or fund a gift card

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amount
string<positive-monetary>
required

Amount to load onto the gift card.

Pattern: ^[0-9]+(\.[0-9]+)?$
Example:

"199.99"

idempotency_key
string
required

Idempotency key to avoid duplicate transactions. Only one transaction may exist with a given idempotency key. Subsequent requests with the same idempotency key will return the data persisted in the database.

account_number
string | null

The account number, typically read from the physical card's magnetic stripe. Note that this should just be the account number, not any additional Track data.

description
string

Description to write alongside the funding transaction

employee_id
string

ID of the employee responsible. Only a register sends one, and it is required there; a back-office session records the signed-in user, and an API credential records itself.

order_id
string

ID of the checkout that funded the gift card, from the transactions resource. Only a register sends one.

physical_barcode
string | null

Barcode on the physical gift card. Provide this, recipient_phone_number, or account_number.

purchaser_phone_number
string<phone>

Phone number of the Shopper that funded the gift card. This may be the same as recipient_phone_number if a shopper buys a gift card for themselves.

Pattern: ^\+[1-9]\d{1,14}$
recipient_phone_number
string<phone> | null

Phone number of the shopper who will own this gift card. This shopper receives messages about this and future transactions. Provide this, physical_barcode, or account_number.

Pattern: ^\+[1-9]\d{1,14}$
store_id
string

ID of the store the funding belongs to. Optional: name a store to attribute it to, or omit it for funding not tied to a store.

Pattern: ^[0-9]+$

Response

Gift card funded successfully.

A prepaid balance a shopper spends at the register. It can be digital, tied to a shopper, or backed by one or more physical cards. A gift card belongs to the banner rather than to any one store, and can be sold, redeemed, or reloaded at any of its registers.

id
string
required

Unique identifier for the record.

balance
string<monetary>
required

Current balance on the gift card.

Pattern: ^-?[0-9]+(\.[0-9]+)?$
Example:

"199.99"

barcodes
string[]
required

Barcodes on the physical cards backing this gift card, across the card and any cards merged into it.

created_at
string<date-time>
required

When the record was created.

deactivated_at
string<date-time> | null
required

When the gift card was deactivated, or null when it is active.

deactivated_by_api_client_id
string | null
required

ID of the API credential that deactivated the gift card, or null when it is active or was deactivated by a person.

deactivated_by_employee_id
string | null
required

ID of the employee who deactivated the gift card, or null when it is active or was deactivated by another actor.

deactivated_by_user_id
string | null
required

ID of the back-office user who deactivated the gift card, or null when it is active or was deactivated by another actor.

deactivation_reason
string | null
required

Reason recorded when the gift card was deactivated, or null when it is active.

last_order_at
string<date-time> | null
required

When the gift card was last used in a sale or refund, or null when it has not been used yet.

magstripe_account_numbers
string[]
required

Account numbers encoded on the magnetic stripe of the physical cards.

owner_id
string | null
required

ID of the shopper who owns the gift card, or null when it has no owner.

printed_account_numbers
string[]
required

Account numbers printed on the physical cards.

purchaser_id
string | null
required

ID of the shopper who purchased the gift card, or null when unknown.

shopper_facing_id
string
required

Short human-readable ID for the gift card, shown to shoppers on receipts and messages.

status
enum<string>
required

Whether the gift card is active and can be used, or has been deactivated.

Available options:
active,
deactivated
updated_at
string<date-time>
required

When the record was last changed.