Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Customers

4 operations under customers. Examples read $API and $KEY from your shell.

GET /v1/customers

Parameters

  • kyc_status string optional in query, one of pending, approved, info_requested, rejected
  • external_id string optional in query
  • limit integer required in query
  • starting_after string optional in query

Responses

200 Default Response

object

  • data array required

    Each item:

    • object string required one of customer
    • id string required
    • type string required one of individual, business
    • name string required
    • email string required (nullable)
    • country string required
    • external_id string required (nullable)
    • kyc_status string required one of pending, approved, info_requested, rejected
    • kyc_reason string required (nullable)
    • metadata object required
    • version integer required
    • created_at string required
    • updated_at string required
  • has_more boolean required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/customers?limit=1" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/customers", {
  params: { query: { limit: 1 } },
});
Copied

POST /v1/customers

Send an Idempotency-Key header on every POST so a retry never repeats the request.

Request body

application/json, required

object

  • type string required one of individual, business
  • name string required
  • email string optional
  • country string required
  • external_id string optional
  • metadata object optional

Responses

201 Default Response

object

  • object string required one of customer
  • id string required
  • type string required one of individual, business
  • name string required
  • email string required (nullable)
  • country string required
  • external_id string required (nullable)
  • kyc_status string required one of pending, approved, info_requested, rejected
  • kyc_reason string required (nullable)
  • metadata object required
  • version integer required
  • created_at string required
  • updated_at string required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  -X POST \
  "$API/v1/customers" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"type":"individual","name":"<name>","country":"<country>"}'
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/customers", {
  body: {
    "type": "individual",
    "name": "<name>",
    "country": "<country>"
  },
});
Copied

GET /v1/customers/{id}

Parameters

  • id string required in path

Responses

200 Default Response

object

  • object string required one of customer
  • id string required
  • type string required one of individual, business
  • name string required
  • email string required (nullable)
  • country string required
  • external_id string required (nullable)
  • kyc_status string required one of pending, approved, info_requested, rejected
  • kyc_reason string required (nullable)
  • metadata object required
  • version integer required
  • created_at string required
  • updated_at string required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/customers/$ID" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/customers/{id}", {
  params: { path: { id: "<id>" } },
});
Copied

PATCH /v1/customers/{id}

Parameters

  • id string required in path

Request body

application/json, required

object

  • name string optional
  • email string optional (nullable)
  • country string optional
  • external_id string optional (nullable)
  • metadata object optional

Responses

200 Default Response

object

  • object string required one of customer
  • id string required
  • type string required one of individual, business
  • name string required
  • email string required (nullable)
  • country string required
  • external_id string required (nullable)
  • kyc_status string required one of pending, approved, info_requested, rejected
  • kyc_reason string required (nullable)
  • metadata object required
  • version integer required
  • created_at string required
  • updated_at string required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  -X PATCH \
  "$API/v1/customers/$ID" \
  -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" \
  -d '{}'
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.PATCH("/v1/customers/{id}", {
  params: { path: { id: "<id>" } },
  body: {},
});
Copied

Edit on GitHub