Integrate the GCNhub API to bridge digital assets to 10,000+ retail brands. RESTful endpoints, SDKs, and webhooks for real-time updates.
The GCNhub API is in private beta. The endpoints below describe the integration as it ships today. Base URLs, credentials and the client library are issued on approval — request access and our team will send your sandbox details.
Once your access is approved you receive a sandbox base URL, an API key and the client library for your stack. From there, a first successful call takes about a minute.
export BASE_URL="<the base URL we send you>"
export GCNHUB_API_KEY="<your sandbox key>"
curl -X GET $BASE_URL/v1/brands \
-H "Authorization: Bearer $GCNHUB_API_KEY"All API requests must include your API key in the Authorization header. Keys are scoped per environment (sandbox vs. production). Never expose your production key in client-side code.
Authorization: Bearer YOUR_API_KEYSandbox and production base URLs are issued per integration when your access is approved, along with your API keys. Every example on this page uses $BASE_URL in place of the host you are assigned.
/v1/brandsRetrieve a list of available brands in a given region, filtered by category.
curl -X GET $BASE_URL/v1/brands \
-H "Authorization: Bearer YOUR_API_KEY" \
-d region=US \
-d category=retail
# Response
{
"data": [
{ "id": "amazon", "name": "Amazon", "regions": ["US","UK","DE"] },
{ "id": "starbucks", "name": "Starbucks", "regions": ["US","CA","UK"] }
],
"total": 10234
}/v1/ordersCreate a gift card order. The payment is settled in crypto and the gift card is returned upon confirmation.
curl -X POST $BASE_URL/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brand": "amazon",
"amount": 50,
"currency": "USD",
"wallet": "0x...",
"webhook_url": "https://yourapp.com/webhooks/gcnhub"
}'
# Response
{
"order_id": "ord_a1b2c3",
"status": "pending",
"amount": 50,
"currency": "USD",
"brand": "amazon"
}/v1/orders/{order_id}Retrieve the status and details of a specific order.
curl -X GET $BASE_URL/v1/orders/ord_a1b2c3 \
-H "Authorization: Bearer YOUR_API_KEY"
# Response
{
"order_id": "ord_a1b2c3",
"status": "completed",
"gift_card": {
"code": "ABCD-1234-EFGH",
"pin": "5678",
"amount": 50,
"currency": "USD",
"expires": "2027-12-31"
}
}/v1/webhooksRegister a webhook endpoint to receive real-time notifications for order status changes.
curl -X POST $BASE_URL/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/gcnhub",
"events": ["order.completed", "order.failed"]
}'The JavaScript client handles authentication, retries, and response parsing for you. It is distributed with your credentials rather than from a public registry.
// The GCNhub client is issued with your API access.
const hub = new GCNhub({
apiKey: process.env.GCNHUB_API_KEY
});
// Fetch available brands
const brands = await hub.catalog.getBrands({ region: 'US' });
// Create a gift card order
const order = await hub.orders.create({
brand: 'amazon',
amount: 50,
currency: 'USD',
wallet: userWalletAddress
});
console.log(order.order_id); // "ord_a1b2c3"SDKs are also available for Python, Go, and Ruby.
Subscribe to real-time events so your platform can react instantly when an order completes or fails. Webhook payloads are signed with HMAC-SHA256 — verify the signature on every request.
{
"event": "order.completed",
"order_id": "ord_a1b2c3",
"brand": "amazon",
"amount": 50,
"currency": "USD",
"gift_card": { "code": "ABCD-1234-EFGH", "pin": "5678" },
"timestamp": "2026-07-24T10:30:00Z"
}Requests are rate-limited per API key. Standard tier allows 60 requests per minute; Enterprise tier is custom. Rate limit headers are included in every response.
200Success — the request was processed correctly.400Bad Request — missing or invalid parameters.401Unauthorized — missing or invalid API key.404Not Found — the requested resource does not exist.429Too Many Requests — rate limit exceeded.500Server Error — something went wrong on our end.Request API access and our team will get you set up with sandbox credentials within 24 hours.
Get API AccessWe use analytics cookies to understand how the site is used. Choosing “Essential only” means no analytics run at all. Read our Cookie Policy.