Payments
- Transactions
- Buyers
- Checkout Sessions
- Payment links
- Payment options
- Payouts
- Refunds
- Sessions
- Settlement records
Instruments
- Card schemes
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
- Gift-card services
Dashboard
- Flow
- Merchant accounts
- Reports
- Report executions
List gift cards
Returns all stored gift cards.
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/gift-cards \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"type": "gift-card",
"id": "e6cdf979-87e2-4796-8ff6-9784d5aed893",
"merchant_account_id": "default",
"service": {
"type": "gift-card-service",
"id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
"merchant_account_id": "default",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver UK",
"active": true,
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00"
},
"bin": "412345",
"sub_bin": "554",
"last4": "1234",
"expiration_date": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"display_name": "John L.",
"external_identifier": "user-789123",
"merchant_account_id": "default",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"account_number": "1234567"
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}
This endpoint requires the gift-cards.read
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Filters the results to only the items for which the buyer
has an
id
that matches this value.
Filters the results to only the items for which the buyer
has an
external_identifier
that matches this value.
Defines the maximum number of items to return for this request.
1 <= x <= 100
A cursor that identifies the page of results to return. This is used to paginate the results of this API.
For the first page of results, this parameter can be left out.
For additional pages, use the value returned by the API in
the next_cursor
field. Similarly the previous_cursor
can be used to
reverse backwards in the list.
Response
A list of stored gift cards.
A list of stored gift cards.
A gift card stored for a buyer, or used in a transaction.
The type of this resource.
gift-card
The ID of this gift card.
The unique ID for a merchant account.
An configured gift card service.
The type of this resource.
gift-card-service
The ID of this gift card service.
The unique ID for a merchant account.
The ID of the gift card service definition used to create this service.
1 - 50
The custom name set for this service.
1 - 200
Defines if this service is currently active or not.
A list of fields, each containing a key-value pair for each field
configured for this gift card service. Fields marked as secret
are not returned.
The date and time when this service was created.
The date and time when this service was last updated.
The first 6 digits of the full gift card number.
The 3 digits after the bin
of the full gift card number.
The last 4 digits for the gift card.
The date and time when this gift card expires. This is a full date/time and may be more accurate than the actual expiry date received by the gift card service.
The optional buyer for which this payment method has been stored.
The type of this resource. Is always buyer
.
buyer
The unique Gr4vy ID for this buyer.
The billing details associated with a buyer.
The type of this resource. Is always billing-details
.
billing-details
The first name(s) or given name of the buyer.
1 - 255
The last name, or family name, of the buyer.
1 - 255
The email address of the buyer.
1 - 320
The phone number of the buyer. This number is formatted according to the E164 number standard.
1 - 50
The billing address of the buyer.
The city for the address.
1 - 100
The country for the address in ISO 3166 format.
2
The postal code or zip code for the address.
1 - 50
The state, county, or province for the address.
1 - 255
The code of state, county, or province for the address in ISO 3166-2 format.
4 - 6
The house number or name for the address. Not all payment services use this field but some do.
1 - 255
The first line of the address.
1 - 255
The second line of the address.
1 - 255
The optional name of the company or organisation to add to the address.
1 - 255
The tax information associated with the billing details.
The tax ID for the buyer.
1 - 50
The kind of tax ID.
ae.trn
, au.abn
, ar.dni
, ar.cuil
, ar.cuit
, br.cnpj
, br.cpf
, ca.bn
, ca.gst_hst
, ca.pst_bc
, ca.pst_mb
, ca.pst_sk
, ca.qst
, ch.vat
, cl.tin
, es.cif
, eu.vat
, gb.vat
, hk.br
, id.nik
, id.npwp
, in.gst
, jp.cn
, jp.rn
, kr.brn
, li.uid
, mx.curp
, my.frp
, my.itn
, my.nric
, my.sst
, no.vat
, nz.gst
, ph.tin
, ru.inn
, ru.kpp
, sa.vat
, sg.gst
, sg.uen
, th.id
, th.vat
, tw.vat
, us.ein
, za.vat
The date and time when this buyer was created in our system.
A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
1 - 200
An external identifier that can be used to match the buyer against your own records.
1 - 200
The unique ID for a merchant account.
The date and time when this buyer was last updated in our system.
The source account number to perform an account funding transaction.
1 - 255
The date and time when this gift card was created in our system.
The date and time when this gift card was last updated in our system.
The limit applied to request. This represents the number of items that are at maximum returned by this request.
1 <= x <= 100
The cursor that represents the next page of results. Use the cursor
query
parameter to fetch this page of items.
1 - 1000
The cursor that represents the next page of results. Use the cursor
query
parameter to fetch this page of items.
1 - 1000
Was this page helpful?
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/gift-cards \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"type": "gift-card",
"id": "e6cdf979-87e2-4796-8ff6-9784d5aed893",
"merchant_account_id": "default",
"service": {
"type": "gift-card-service",
"id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
"merchant_account_id": "default",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver UK",
"active": true,
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00"
},
"bin": "412345",
"sub_bin": "554",
"last4": "1234",
"expiration_date": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"display_name": "John L.",
"external_identifier": "user-789123",
"merchant_account_id": "default",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"account_number": "1234567"
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}