Zebec Partner Service Documentation
Integration Guide API Specification Recipient Specs Valid Countries ๐Ÿงช Sandbox Swagger Docs HMAC Generator

Zebec Card API Integration Guide

API Versions Overview

๐Ÿ“ฆ Two API Products Available: The Zebec Partner Service offers two API product tiers - v1 (Standard) and v2 (Premium) - each with different capabilities and access levels.

v1 Standard API

Core card operations available to all partners:

Rate Limit: 100 requests/minute (default)

v2 Premium API

Enhanced features with granular access control:

Rate Limit: 500 requests/minute (default)

Security: Card numbers are masked - only last 4 digits returned

โš ๏ธ Important: v2 endpoints require a v2 API key. Attempting to access v2 endpoints with a v1 key will result in a 403 Forbidden error with upgrade information.

Getting Started

You'll receive your API key and secret via email after successful partnership registration. Your API key will be assigned to either v1 or v2 product tier based on your agreement.

Authentication

All API requests must be signed using HMAC-SHA256 authentication.

Required Headers

Header Description Example
x-api-key Your unique API key ak_1234567890abcdef
x-timestamp Current Unix timestamp (seconds) 1704067200
x-nonce MANDATORY - Unique request identifier 550e8400-e29b-41d4-a716-446655440000
x-signature HMAC-SHA256 signature a1b2c3d4...

Signature Generation

Create the signature by following these steps:

  1. Create string to sign: {METHOD}{PATH}{TIMESTAMP}{API_KEY}{BODY}
  2. Generate HMAC-SHA256 using your secret key
  3. Use the hex digest as the signature
๐Ÿ“ Note: The nonce is NOT included in signature calculation (reserved for future replay protection).

Example Signature Generation (JavaScript)

const crypto = require('crypto');

function createHmacSignature(method, path, apiKey, secretKey, body = '') {
  const timestamp = Math.floor(Date.now() / 1000); // Unix timestamp in seconds
  const stringToSign = [
    method.toUpperCase(),
    path,
    timestamp,
    apiKey,
    body ? JSON.stringify(body) : '',
  ].join('');

  const signature = crypto
    .createHmac('sha256', secretKey)
    .update(stringToSign)
    .digest('hex');

  return {
    'x-api-key': apiKey,
    'x-signature': signature,
    'x-timestamp': timestamp.toString(),
    'x-nonce': crypto.randomUUID(),
    'Content-Type': 'application/json'
  };
}

Testing Your Integration

GET /ping - Infrastructure Health Check

For load balancers and basic service monitoring. No authentication required.

GET /ping HTTP/1.1
Host: api.zebec.io

Response: "Hello World!"

v1 API Endpoints

1. Get Available Card Programs

GET /orders/programs?country={countryCode}

Query Parameters:

Example Response:

[
  {
    "id": "silver-regional-na",
    "type": "REGIONAL",
    "name": "Silver Card - Regional",
    "description": "Regional card for North America",
    "isRegional": true,
    "isInternational": false,
    "availableCurrencies": ["USD", "CAD"],
    "region": "NA",
    "country": "USA"
  }
]

2. Validate Recipient Address

POST /orders/validate-address

Request Body:

{
  "address1": "1600 Pennsylvania Avenue NW",
  "city": "Washington",
  "state": "DC",
  "postalCode": "20500",
  "countryCode": "USA"
}

3. Create Card Order

POST /orders/create

Request Body:

{
  "amount": {
    "amount": 100,
    "currencyCode": "USD"
  },
  "programId": "silver-regional-na",
  "recipient": {
    "participantId": "USER123",
    "firstName": "John",
    "lastName": "Doe",
    "address1": "123 Main St",
    "address2": "Apt 4B",
    "city": "San Francisco",
    "state": "CA",
    "postalCode": "94105",
    "countryCode": "USA",
    "emailAddress": "john.doe@example.com",
    "mobilePhone": "4155551234",
    "language": "en-US"
  },
  "receipt": {
    "deposit": {
      "tokenName": "USDC",
      "tokenAmount": 100000000,
      "txHash": "0xabc123...",
      "buyerAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
    }
  }
}

4. Lookup Orders

GET /orders/lookup?email={email}
GET /orders/lookup?orderId={orderId}
GET /orders/lookup?txHash={txHash}

Provide exactly one query parameter.

v2 Premium API Endpoints

๐Ÿ”’ Authentication: All v2 endpoints require a v2 API key and appropriate feature flags.

1. Get Card Details with Balance

GET /v2/cards/{orderId}

Returns: Complete card information including current balance

Security: Card number is masked - only last 4 digits shown

2. Get Card Balance

GET /v2/cards/{orderId}/balance

Requires: balanceAccess feature flag

Example Response:

{
  "orderId": "804cfd34-a685-4baa-8861-15d79e2fe7e5",
  "balance": {
    "available": 95.50,
    "pending": 0,
    "currency": "USD"
  },
  "lastUpdated": "2026-01-06T10:30:00Z"
}

3. Get Transaction History

POST /v2/cards/{orderId}/transactions?page=1&limit=10

Requires: transactionAccess feature flag

Query Parameters:

4. List All Cards

GET /v2/cards?page=1&limit=10

Returns: Paginated list of all cards for your client

Error Responses

403 Forbidden - Product Upgrade Required

{
  "statusCode": 403,
  "message": "This endpoint requires a v2 API key.",
  "error": "Forbidden",
  "upgradeInfo": {
    "currentProduct": "v1",
    "requiredProduct": "v2",
    "benefits": [
      "Real-time balance viewing",
      "Transaction history access",
      "Advanced card management",
      "Higher rate limits (500 req/min)",
      "Priority support"
    ],
    "contactSales": "sales@zebec.io",
    "documentation": "/docs/api-integration-guide.md"
  }
}

403 Forbidden - Feature Access Required

{
  "statusCode": 403,
  "message": "Feature 'balanceAccess' is not enabled for your account.",
  "featureInfo": {
    "requiredFeature": "balanceAccess",
    "currentProduct": "v2",
    "enabledFeatures": ["transactionAccess"],
    "message": "Please upgrade your plan or contact sales to enable this feature.",
    "contactSales": "sales@zebec.io"
  }
}

Best Practices

Next Steps

  1. Review the complete API specification
  2. Test your integration in the sandbox environment
  3. Use the HMAC generator tool to debug authentication
  4. Check recipient specifications for field requirements
  5. Review valid countries for supported regions