Gift cards
Create gift card
Account updater
Buyers - Payment methods
Payment methods
Payment methods - Payment service tokens
Payment methods - Network tokens
Buyers - Gift cards
Buyers - Shipping details
Card scheme definitions
Digital wallets - Setup
Digital wallets - Sessions
Transactions
Refunds
Payment options
Payment service definitions
Payment services
Audit logs
Checkout sessions
Merchant accounts
Gift cards
Create gift card
Store a new gift card in the vault.
POST
/
gift-cards
curl --request POST \
--url https://api.{id}.gr4vy.app/gift-cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"number": "4123455541234561234",
"pin": "1234"
}'
{
"type": "gift-card",
"id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
"merchant_account_id": "default",
"gift_card_service": {
"type": "gift-card-service",
"id": "35b60feec-a7c7-4844-b503-f39b09192d81",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver USA"
},
"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",
"merchant_account_id": "default",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "us.ein"
}
},
"account_number": "<string>",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
The ID of the merchant account to use for this request.
Examples:
"default"
Query Parameters
Body
application/json
Response
201
application/json
Successful Response
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.{id}.gr4vy.app/gift-cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"number": "4123455541234561234",
"pin": "1234"
}'
{
"type": "gift-card",
"id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
"merchant_account_id": "default",
"gift_card_service": {
"type": "gift-card-service",
"id": "35b60feec-a7c7-4844-b503-f39b09192d81",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver USA"
},
"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",
"merchant_account_id": "default",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "us.ein"
}
},
"account_number": "<string>",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
},
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}