Skip to main content

Gift Card API (v0)

Download OpenAPI specification:Download

Use this API to manage gift card operations, such as checking the balance on a card and activating cards.

Activate gift card

Activates an existing gift card.

Before they can be activated, cards are issued with the Issue gift card method.

Note: The activation process might also be called registration, depending on the provider.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
card_number
required
string

Identifier of the card to receive the specified amount and customer description.

required
object (A monetary amount consisting of value and currency.)

Initial amount assigned to the gift card.

required
object (Customer identifying information)

Customer information to add to the card.

metadata
object

Provider-specific metadata. For example, this property can contain custom business information related to the activation of the gift card. The field 'original_operation' = 'activation' is always provided. This data can also be exposed to the customer if needed. Talk to your contact point at NewStore for more information.

idempotence_key
string

Identifier of the request to make sure the request is not performed twice when retried in case of network issues. The response should always be the same for all requests containing the same key, regardless of parameter changes.

Responses

Request samples

Content type
application/json
{
  • "card_number": "5h78k5367h09q34n22",
  • "amount": {
    },
  • "customer": {
    },
  • "idempotence_key": "6234h6k263bb589v0bnv3"
}

Response samples

Content type
application/json
{
  • "identifier": {
    }
}

Deactivate gift card

Deactivates an existing gift card, invalidating all the remaining balance.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
card_number
required
string

Identifier of the card to receive the specified amount and customer description.

pin
string

The pin associated with the gift card.

store_id
string

Identifier of the store where the card is being deactivated.

idempotence_key
string

Identifier of the request to make sure the request is not performed twice when retried in case of network issues. The response should always be the same for all requests containing the same key, regardless of parameter changes.

Responses

Request samples

Content type
application/json
{
  • "card_number": "5h78k5367h09q34n22",
  • "pin": "1042"
}

Response samples

Content type
application/json
{
  • "error_code": "string",
  • "message": "string",
  • "request_id": "string"
}

Get balance

Returns the balance of a gift card identified by the passed ID.

Request Body schema: application/json
number
string

Number of the card

pin
string

Personal Identification Number to be sent to the customer for usage.

metadata
object

Provider-specific metadata. For example, this property can contain custom business information related to the activation of the gift card. The field 'original_operation' = 'activation' is always provided. This data can also be exposed to the customer if needed. Talk to your contact point at NewStore for more information.

Responses

Request samples

Content type
application/json
{
  • "number": "5h78k5367h09q34n22",
  • "pin": "4125",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "value": 100,
  • "currency": "USD"
}