canonical: https://jentic.com/apis/vtex.local/giftcard-api

# Vtex Giftcard API

>ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). 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 clien. The API exposes 11 endpoints secured with apiKey authentication.

## For AI agents

Programmatically create a gift card, get a gift card by id. Covers 11 operations with apiKey authentication.

## Scope

Does not handle communications, crm, or developer tools - use for payments only.

## Capabilities

- Create a gift card
- Get a gift card by ID
- List all gift cards
- Query and filter Giftcard API records by parameters
- Monitor Giftcard API operational status and events

## Use cases

### Payments Operations

Use the Giftcard API to perform payments operations programmatically. The API provides 11 endpoints covering core functionality including create a gift card, get a gift card by id, list all gift cards.

Example prompt: Call POST /giftcards to create a gift card

### Automated Gift Card Management

Automate gift card operations by combining multiple Giftcard API endpoints. Agents can get a gift card by id and then list all gift cards in a single workflow.

Example prompt: Call GET `/giftcards/{giftCardId}` to get a gift card by id, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Giftcard API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'create a gift card', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/giftcards` | Create a gift card |
| GET | `/giftcards/{giftCardId}` | Get a gift card by ID |
| POST | `/giftcards/_search` | List all gift cards |
| POST | `/giftcards/{giftCardId}/transactions` | Create a gift card transaction |
| GET | `/giftcards/{giftCardId}/transactions` | List all gift card transactions |
| GET | `/giftcards/{giftCardId}/transactions/{transactionId}` | Get a gift card transaction by ID |
| GET | `/giftcards/{giftCardId}/transactions/{transactionId}/authorization` | Get a gift card transaction authorization |
| POST | `/giftcards/{giftCardId}/transactions/{transactionId}/cancellations` | Cancel a gift card transaction |

## Key resources

- **Gift Card** — Operations related to Gift Card
- **Transactions** — Operations related to Transactions

## Why Jentic

- **Setup:** Wiring the VTEX Giftcard API by hand means pairing an App Key with an App Token in the X-VTEX-API-AppKey and X-VTEX-API-AppToken headers, and templating the {accountName} and {environment} host into every call. Through Jentic you install once, import the Giftcard API from the API Directory, store the App Key and App Token once, and your agent calls it.
- **Permission scoping:** The Giftcard API puts the gift card id in the URL path (`/giftcards/{giftCardId}/transactions`), so a rule can pin your agent to one gift card and the transactions under it. You choose the operations it may call, so destructive ones like cancelling a transaction are not included unless you add them.
- **Credential handling:** Your VTEX App Key and App Token are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a gift card' or 'record a gift card transaction', and Jentic returns the matching Giftcard API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe** — Alternative payments API
- **Adyen** — Alternative payments API
- **Square** — Complementary payments API
- **Paypal** — Complementary payments API

## FAQ

### What authentication does the Giftcard API use?

The Giftcard API uses an API key passed in the `X-VTEX-API-AppKey` header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create a gift card with the Giftcard API?

Yes. Use the POST /giftcards endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Giftcard API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create a gift card through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create a gift card'. Jentic returns the matching Giftcard API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Giftcard API have?

The Giftcard API exposes 11 endpoints covering gift card, transactions operations.

### Can I limit what my agent is allowed to do with the Giftcard API?

Yes. Because you run Jentic One yourself, your own rules decide which Giftcard API operations and credentials the agent may use. Since the gift card id sits in the URL path, such as `/giftcards/{giftCardId}/transactions`, you can pin the agent to a single gift card and the transactions beneath it. You also pick the exact operations it may call, so destructive ones like cancelling a transaction stay out of reach unless you explicitly add them.
