Giftcard API
Check the new Payments onboarding guide. We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.
The gift card is a payment method configured as a cash value associated with a client. It is used to grant a discount on the value of the order at the store. A gift card works as a payment method, not a promotion.
In VTEX's native gift card system, you can choose to create a new gift card either through VTEX Admin or API. However, there are specific conditions to be observed when generating gift cards by one of these two methods.
| Specifications | VTEX Admin | Giftcard API |
|---|---|---|
| Initial value | You can create gift cards value with any value. | All gift cards are generated with no value (balance = 0). After its creation, you need to use VTEX Admin or the Create a gift card transaction to add any balance amount. |
| Ownership restriction | You can create gift cards with or without a user assigned to them. | All gift cards must be created with a profileId associated to them. |
| User data identification | Customer ID (data that identifies a specific client, such as CPF/CNPJ in Brazil). | profileId (data that identifies a specific client) |
| Additional Settings | You can use checkboxes to select whether a gift card will be: Restricted (only a specific customer ID can use this gift card), Reloadable (balance can be changed while it is still active), or Reusable (available for making new purchases with this gift card until its value is completely used up). | You can use the following fields to configure the same conditions applied in VTEX Admin: restrictedToOwner, multipleCredits, and multipleRedemptions. |
All Giftcard API endpoints are limited to 500 concurrent requests and 5000 requests per minute.
Giftcard API Index
Giftcard
POSTCreate a gift cardGETGet a gift card by IDPOSTList all gift cards
Transaction
POSTCreate a gift card transactionGETGet a gift card transaction by IDGETList all gift card transactionsGETGet a gift card transaction authorizationPOSTCancel a gift card transactionGETList all gift card transactions cancellationsPOSTSettle a gift card transactionGETList all gift card transactions settlements
Endpoints
Gift Card
| Summary | Method | Path |
|---|---|---|
| Create a gift card | POST | /giftcards |
| Get a gift card by ID | GET | /giftcards/{giftCardId} |
| List all gift cards | POST | /giftcards/_search |
Transactions
| Summary | Method | Path |
|---|---|---|
| List all gift card transactions | GET | /giftcards/{giftCardId}/transactions |
| Create a gift card transaction | POST | /giftcards/{giftCardId}/transactions |
| Get a gift card transaction by ID | GET | /giftcards/{giftCardId}/transactions/{transactionId} |
| Get a gift card transaction authorization | GET | /giftcards/{giftCardId}/transactions/{transactionId}/authorization |
| List all gift card transactions cancellations | GET | /giftcards/{giftCardId}/transactions/{transactionId}/cancellations |
| Cancel a gift card transaction | POST | /giftcards/{giftCardId}/transactions/{transactionId}/cancellations |
| List all gift card transactions settlements | GET | /giftcards/{giftCardId}/transactions/{transactionId}/settlements |
| Settle a gift card transaction | POST | /giftcards/{giftCardId}/transactions/{transactionId}/settlements |