Skip to main content
POST
Store gift card
This endpoint requires the gift-cards.write scope.

Authorizations

Authorization
string
header
required

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

Body

application/json

The gift card details to store.

number
string
required

The 16-19 digit number for this gift card.

Required string length: 16 - 19
Pattern: ^[0-9]{16,19}$
Example:

"4123455541234561234"

pin
string
required

The PIN for this gift card.

Example:

"1234"

buyer_id
string<uuid>

The ID of the buyer to associate this gift card to. If this field is provided then the buyer_external_identifier field needs to be unset.

Example:

"fe26475d-ec3e-4884-9553-f7356683f7f9"

buyer_external_identifier
string

The external_identifier of the buyer to associate this gift card to. If this field is provided then the buyer_id field needs to be unset.

Example:

"user-789123"

Response

Returns the stored gift card.

A gift card stored for a buyer, or used in a transaction.

type
enum<string>

The type of this resource.

Available options:
gift-card
Example:

"gift-card"

id
string<uuid>

The ID of this gift card.

Example:

"e6cdf979-87e2-4796-8ff6-9784d5aed893"

merchant_account_id
string

The unique ID for a merchant account.

Example:

"default"

service
A gift card service · object

An configured gift card service.

bin
string

The first 6 digits of the full gift card number.

Example:

"412345"

sub_bin
string

The 3 digits after the bin of the full gift card number.

Example:

"554"

last4
string

The last 4 digits for the gift card.

Example:

"1234"

expiration_date
string<date-time> | null

The date and time when this gift card expires. This is a full date/time and may be more accurate than the actual expiry date received by the gift card service.

Example:

"2013-07-16T19:23:00.000+00:00"

buyer
Buyer · object | null

The optional buyer for which this payment method has been stored.

created_at
string<date-time>

The date and time when this gift card was created in our system.

Example:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>

The date and time when this gift card was last updated in our system.

Example:

"2013-07-16T19:23:00.000+00:00"