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:
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
- Payload
{- "card_number": "5h78k5367h09q34n22",
- "amount": {
- "value": 100,
- "currency": "USD"
}, - "customer": {
- "id": "64810476",
- "email": "jay_doubleyou@example.com",
- "name": "Jay Doubleyou"
}, - "idempotence_key": "6234h6k263bb589v0bnv3"
}
Response samples
- 200
- 400
{- "identifier": {
- "number": "5h78k5367h09q34n22",
- "pin": "4125"
}
}
Deactivate gift card
Deactivates an existing gift card, invalidating all the remaining balance.
Authorizations:
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
- Payload
{- "card_number": "5h78k5367h09q34n22",
- "pin": "1042"
}
Response samples
- 400
{- "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
- Payload
{- "number": "5h78k5367h09q34n22",
- "pin": "4125",
- "metadata": {
- "store_id": "some-store-identifier"
}
}
Response samples
- 200
- 400
{- "value": 100,
- "currency": "USD"
}