v50

latestOpenAPI 3.0.0raw.githubusercontent.com2026-02-02112393.9 KB
Transactions

Create a gift card transaction

Creates a transaction (credit or debit) to a gift card and authorize the item reservation.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:

ProductCategoryResource
GiftCardGiftCardGift card full access

There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see Authentication overview.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

post/giftcards/{giftCardId}/transactions

Path parameters

giftCardIdstring required
Example:7

Gift card identification.

Headers

Content-Typestring required

Type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

operationstring required

Type of operation. Possible values are: Debit or Credit.

valuenumber required

Operation value.

descriptionstring required

Description information.

redemptionTokenstring required

Gift card redemption token.

redemptionCodestring required

Gift card identification code used at checkout. Minimum of 6 characters.

requestIdstring required

Request identification of the transaction. You need to send a different requestId value every time you make a new transaction. If you send the same requestIdtwo or more times with a specific redemptionCodeor redemptionToken, the gift card balance will not be updated.

Example request

{
  "operation": "Debit",
  "value": 3,
  "description": "GiftCardHub",
  "redemptionToken": "b2dac6f2-f365-48cd-82a9-0b376a55557a",
  "redemptionCode": "***********ASDQ",
  "requestId": "B56CBE231DEE4E1A859183C1030CE926",
  "orderInfo": {
    "orderId": "v5006128str",
    "sequence": 5006128,
    "cart": {
      "items": [
        {
          "id": "2001023",
          "productId": "2000492",
          "refId": "35994",
          "name": "Vaporizador Des. ColC4nia Branco",
          "value": 14.99,
          "price": 14.99,
          "quantity": 1,
          "discount": -7.5,
          "priceTags": [
            {
              "name": "discount@price-discount_store_183#4911bf6f-22a2-4af1-a365-cce895c3df2c"
            }
          ]
        }
      ],
      "discounts": -7.5,
      "shipping": 7.27,
      "itemsTotal": 14.99
    },
    "clientProfile": {
      "email": "michael.scott96@mail.com",
      "firstName": "Michael",
      "lastName": "Scott",
      "document": "02906792063",
      "phone": "+551111111111",
      "birthDate": "0001-01-01T00:00:00"
    },
    "shipping": {
      "receiverName": "Michael Scott",
      "postalCode": "22250040",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "country": "BRA",
      "street": "Praia de Botafogo",
      "number": "111",
      "neighborhood": "Botafogo",
      "complement": "House",
      "reference": "Subway"
    }
  }
}

Response

OK

idstring required

Transaction identification.