POST /v2/gift-cards
Creates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before it can be used for payment. For more information, see Selling gift cards.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
location_id |
String | Yes |
The location ID where the gift card that will be created should be registered. |
idempotency_key |
String | Yes |
A unique string that identifies the |
gift_card |
Object | Yes |
Represents a Square gift card. |
gift_card.id |
String | No |
The Square-assigned ID of the gift card. |
gift_card.customer_ids[] |
Array | No |
The IDs of the customers to whom this gift card is linked. |
gift_card.gan_source |
No | ||
gift_card.gan |
String | No |
The gift card account number. |
gift_card.type |
Yes | ||
gift_card.balance_money |
Object | No |
Represents an amount of money. |
gift_card.balance_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
gift_card.balance_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
gift_card.created_at |
String | No |
The timestamp when the gift card was created, in RFC 3339 format.
In the case of a digital gift card, it is the time when you create a card
(using the Square Point of Sale application, Seller Dashboard, or Gift Cards API). |
gift_card.state |
No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.