Skip to main content
This guide covers everything you need to know about creating and managing customers in the Grid API for Bitcoin rewards distribution.

Overview

Customers are the recipients of your Bitcoin rewards. They can be individuals or businesses. Each customer in the Grid system has:
  • System-generated ID: Unique identifier assigned by Grid (e.g., Customer:019542f5-b3e7-1d02-0000-000000000001)
  • Customer Type: Either INDIVIDUAL or BUSINESS
  • KYC Status: Indicates if the customer has been verified and approved.
  • Internal Accounts: Automatically created for each supported currency upon customer creation
  • Platform Customer ID: Optional field to link to your own user/customer ID
The platformCustomerId field is optional but recommended. Use your existing user IDs to maintain a simple mapping between your system and Grid.

Customer Onboarding

Regulated platforms have lighter KYC requirements since they handle compliance verification internally.
The KYC/KYB flow allows you to onboard customers through direct API calls.Regulated financial institutions can:
  • Direct API Onboarding: Create customers directly via API calls with minimal verification
  • Internal KYC/KYB: Handle identity verification through your own compliance systems
  • Reduced Documentation: Only provide essential customer information required by your payment counterparty or service provider.
  • Faster Onboarding: Streamlined process for known, verified customers

Creating Customers via Direct API

For regulated platforms, you can create customers directly through the API without requiring external KYC verification:To register a new customer in the system, use the POST /customers endpoint:
curl -X POST "https://api.lightspark.com/grid/2025-10-13/customers" \
  -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "platformCustomerId": "customer_12345",
    "customerType": "INDIVIDUAL",
    "fullName": "Jane Doe",
    "birthDate": "1992-03-25",
    "nationality": "US",
    "address": {
      "line1": "123 Pine Street",
      "city": "Seattle",
      "state": "WA",
      "postalCode": "98101",
      "country": "US"
    },
    "bankAccountInfo": {
      "accountType": "US_ACCOUNT",
      "accountNumber": "123450000",
      "routingNumber": "000123456",
      "accountCategory": "CHECKING",
      "bankName": "Chase Bank"
    }
  }'
The API allows creating a customer with minimal PII.Here is an example of a customer creation request body bankAccountInfo is always required:
{
  "platformCustomerId": "9f84e0c2a72c4fa",
  "customerType": "INDIVIDUAL",
  "bankAccountInfo": {
      "accountType": "US_ACCOUNT",
      "accountNumber": "123450000",
      "routingNumber": "000123456",
      "accountCategory": "CHECKING",
      "bankName": "Chase Bank"
    }
}
The examples below show a more comprehensive set of data. Not all fields are strictly required by the API for customer creation itself, but become necessary based on currency and UMA provider requirements if using UMA.
  • Individual customer
  • Business Customer
{
  "platformCustomerId": "9f84e0c2a72c4fa",
  "customerType": "INDIVIDUAL",
  "fullName": "John Sender",
  "birthDate": "1985-06-15",
  "address": {
    "line1": "Paseo de la Reforma 222",
    "line2": "Piso 15",
    "city": "Ciudad de México",
    "state": "Ciudad de México",
    "postalCode": "06600",
    "country": "MX"
  },
  "bankAccountInfo": {
    "accountType": "CLABE",
    "clabeNumber": "123456789012345678",
    "bankName": "Banco de México"
  }
}
Unregulated platforms require full KYC/KYB verification of customers through hosted flows.
Unregulated platforms must:
  • Hosted KYC Flow: Use the hosted KYC link for complete identity verification
  • Extended Review: Customers may require manual review and approval in some cases
The hosted KYC flow provides a secure, hosted interface where customers can complete their identity verification and onboarding process.
curl -X GET "https://api.lightspark.com/grid/2025-10-13/customers/kyc-link?redirectUri=https://yourapp.com/onboarding-complete&platformCustomerId=019542f5-b3e7-1d02-0000-000000000001" \
  -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET"
Response:
{
  "kycUrl": "https://kyc.lightspark.com/onboard/abc123def456",
  "platformCustomerId": "019542f5-b3e7-1d02-0000-000000000001"
}

Complete KYC Process

1

Generate KYC Link

Call the /customers/kyc-link endpoint with your redirectUri parameter to generate a hosted KYC URL for your customer.
The redirectUri parameter is embedded in the generated KYC URL and will be used to automatically redirect the customer back to your application after they complete verification.
2

Redirect Customer

Redirect your customer to the returned kycUrl where they can complete their identity verification in the hosted interface.
The KYC link is single-use and expires after a limited time period for security.
3

Customer Completes Verification

The customer completes the identity verification process in the hosted KYC interface, providing required documents and information.
The hosted interface handles document collection, verification checks, and compliance requirements automatically.
After verification processing, you’ll receive a KYC status webhook notification indicating the final verification result.
4

Automatic Redirect

Upon successful KYC completion, the customer is automatically redirected to your specified redirectUri URL.
The customer account will be automatically created by the system upon successful KYC completion. You can identify the new customer using your platformCustomerId or other identifiers.
5

Handle Completion

On your redirect page, handle the completed KYC flow and integrate the new customer into your application.
When a customer is created successfully, internal accounts are automatically created for each currency configured on your platform. These accounts can be used as sources or destinations for transfers.

Hanlding KYC/KYC Webhooks

After a customer completes the KYC/KYB verification process, you’ll receive webhook notifications about their KYC status. These notifications are sent to your configured webhook endpoint.
For regulated platforms, customers are created with APPROVED KYC status by default.
Webhook Payload (sent to your endpoint):
{
  "webhookId": "Webhook:019542f5-b3e7-1d02-0000-000000000020",
  "type": "KYC_STATUS",
  "timestamp": "2023-07-21T17:32:28Z",
  "customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
  "kycStatus": "APPROVED",
  "platformCustomerId": "1234567"
}
Webhook Headers:
  • Content-Type: application/json
  • X-Webhook-Signature: sha256=abc123...
customerId
string
required
System-generated unique identifier of the customer whose KYC status has changed.
kycStatus
string
required
Final KYC verification status. Webhooks are only sent for final states:
  • APPROVED: Customer verification completed successfully
  • REJECTED: Customer verification was rejected
  • EXPIRED: KYC verification has expired and needs renewal
  • CANCELED: Verification process was canceled
  • MANUALLY_APPROVED: Customer was manually approved by platform
  • MANUALLY_REJECTED: Customer was manually rejected by platform
Intermediate states like PENDING_REVIEW do not trigger webhook notifications. Only final resolution states will send webhook notifications.
// Example webhook handler for KYC status updates
// Note: Only final states trigger webhook notifications
app.post('/webhooks/kyc-status', (req, res) => {
  const { customerId, kycStatus } = req.body;
  
  switch (kycStatus) {
    case 'APPROVED':
      // Activate customer account
      await activateCustomer(customerId);
      await sendWelcomeEmail(customerId);
      break;
      
    case 'REJECTED':
      // Notify support and customer
      await notifySupport(customerId, 'KYC_REJECTED');
      await sendRejectionEmail(customerId);
      break;
      
    case 'MANUALLY_APPROVED':
      // Handle manual approval
      await activateCustomer(customerId);
      await sendWelcomeEmail(customerId);
      break;
      
    case 'MANUALLY_REJECTED':
      // Handle manual rejection
      await notifySupport(customerId, 'KYC_MANUALLY_REJECTED');
      await sendRejectionEmail(customerId);
      break;
      
    case 'EXPIRED':
      // Handle expired KYC
      await notifyCustomerForReKyc(customerId);
      break;
      
    case 'CANCELED':
      // Handle canceled verification
      await logKycCancelation(customerId);
      break;
      
    default:
      // Log unexpected statuses
      console.log(`Unexpected KYC status ${kycStatus} for customer ${customerId}`);
  }
  
  res.status(200).send('OK');
});

Listing Customers

Retrieve a paginated list of customers with optional filtering:
curl -X GET "https://api.lightspark.com/grid/2025-10-13/customers?limit=20&customerType=INDIVIDUAL" \
  -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET"

Query Parameters

platformCustomerId
string
Filter by your platform’s customer identifier
customerType
string
Filter by customer type (INDIVIDUAL or BUSINESS)
createdAfter
string
Filter customers created after this timestamp (ISO 8601)
createdBefore
string
Filter customers created before this timestamp (ISO 8601)
updatedAfter
string
Filter customers updated after this timestamp (ISO 8601)
updatedBefore
string
Filter customers updated before this timestamp (ISO 8601)
isIncludingDeleted
boolean
Whether to include deleted customers in results (default: false)
limit
integer
Maximum number of results per page (default: 20, max: 100)
cursor
string
Pagination cursor from previous response

Response

{
  "data": [
    {
      "id": "Customer:019542f5-b3e7-1d02-0000-000000000001",
      "platformCustomerId": "user_12345",
      "customerType": "INDIVIDUAL",
      "kycStatus": "APPROVED",
      "fullName": "Jane Doe",
      "birthDate": "1992-03-25",
      "address": {
        "line1": "123 Pine Street",
        "line2": "Unit 501",
        "city": "Seattle",
        "state": "WA",
        "postalCode": "98101",
        "country": "US"
      },
      "createdAt": "2025-10-03T12:00:00Z",
      "updatedAt": "2025-10-03T12:00:00Z",
      "isDeleted": false
    }
  ],
  "hasMore": true,
  "nextCursor": "MjAyNS0xMC0wM1QxMjowMDowMFo=",
  "totalCount": 152
}
To find a specific customer by your platform ID, use: GET /customers?platformCustomerId=user_12345

Retrieving a Single Customer

Get detailed information about a specific customer:
curl -X GET "https://api.lightspark.com/grid/2025-10-13/customers/{customerId}" \
  -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET"

Deleting Customers

Delete a customer by their system-generated ID:
curl -X DELETE "https://api.lightspark.com/grid/2025-10-13/customers/{customerId}" \
  -H "Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET"
Deleting a customer is permanent and will prevent them from receiving future payments. Their transaction history will be preserved but the customer record will be marked as deleted.
I