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

Counterparties

8 operations under counterparties. Examples read $API and $KEY from your shell.

GET /v1/counterparties

Parameters

  • type string optional in query, one of bank_account, stellar_wallet
  • status string optional in query, one of pending_verification, active, archived
  • limit integer required in query
  • starting_after string optional in query

Responses

200 Default Response

object

  • data array required

    Each item:

    • id string required
    • type string required one of bank_account, stellar_wallet
    • label string required (nullable)
    • status string required one of pending_verification, active, archived
    • created_at string required
    • verified_at string required (nullable)
    • archived_at string required (nullable)
    • bank_account object required (nullable)
      • beneficiary_name string required
      • bank_name string required
      • account_number_last4 string required
      • routing_code string required
      • currency string required one of USD, EUR
    • stellar_wallet object required (nullable)
      • address string required
      • kind string required one of account, contract
    • ownership_proof object optional
      • method string required one of signed_challenge, signed_auth_entry
      • challenge_xdr string required
      • expires_at string required
    • checks object optional
      • account string required one of present, missing
      • trustline string required one of present, missing
      • frozen boolean required
      • offer string required one of sponsored_trustline (nullable)
  • has_more boolean required

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

curl

curl -s \
  "$API/v1/counterparties?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/counterparties", {
  params: { query: { limit: 1 } },
});
Copied

POST /v1/counterparties

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

Request body

application/json, required

one of

  1. Variant 1: object

    • type string required one of bank_account
    • label string optional
    • beneficiary_name string required
    • bank_name string required
    • account_number string required
    • routing_code string required
    • currency string required one of USD, EUR
  2. Variant 2: object

    • type string required one of stellar_wallet
    • address string required
    • label string optional

Responses

201 Default Response

object

  • id string required
  • type string required one of bank_account, stellar_wallet
  • label string required (nullable)
  • status string required one of pending_verification, active, archived
  • created_at string required
  • verified_at string required (nullable)
  • archived_at string required (nullable)
  • bank_account object required (nullable)
    • beneficiary_name string required
    • bank_name string required
    • account_number_last4 string required
    • routing_code string required
    • currency string required one of USD, EUR
  • stellar_wallet object required (nullable)
    • address string required
    • kind string required one of account, contract
  • ownership_proof object optional
    • method string required one of signed_challenge, signed_auth_entry
    • challenge_xdr string required
    • expires_at string required
  • checks object optional
    • account string required one of present, missing
    • trustline string required one of present, missing
    • frozen boolean required
    • offer string required one of sponsored_trustline (nullable)

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"type":"bank_account","beneficiary_name":"<beneficiary_name>","bank_name":"<bank_name>","account_number":"<account_number>","routing_code":"<routing_code>","currency":"USD"}'
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/counterparties", {
  body: {
    "type": "bank_account",
    "beneficiary_name": "<beneficiary_name>",
    "bank_name": "<bank_name>",
    "account_number": "<account_number>",
    "routing_code": "<routing_code>",
    "currency": "USD"
  },
});
Copied

GET /v1/counterparties/{id}

Parameters

  • asset string optional in query
  • id string required in path

Responses

200 Default Response

object

  • id string required
  • type string required one of bank_account, stellar_wallet
  • label string required (nullable)
  • status string required one of pending_verification, active, archived
  • created_at string required
  • verified_at string required (nullable)
  • archived_at string required (nullable)
  • bank_account object required (nullable)
    • beneficiary_name string required
    • bank_name string required
    • account_number_last4 string required
    • routing_code string required
    • currency string required one of USD, EUR
  • stellar_wallet object required (nullable)
    • address string required
    • kind string required one of account, contract
  • ownership_proof object optional
    • method string required one of signed_challenge, signed_auth_entry
    • challenge_xdr string required
    • expires_at string required
  • checks object optional
    • account string required one of present, missing
    • trustline string required one of present, missing
    • frozen boolean required
    • offer string required one of sponsored_trustline (nullable)

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

curl

curl -s \
  "$API/v1/counterparties/$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/counterparties/{id}", {
  params: { path: { id: "<id>" } },
});
Copied

POST /v1/counterparties/{id}/archive

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

Parameters

  • id string required in path

Request body

application/json, required

object

Responses

200 Default Response

object

  • id string required
  • type string required one of bank_account, stellar_wallet
  • label string required (nullable)
  • status string required one of pending_verification, active, archived
  • created_at string required
  • verified_at string required (nullable)
  • archived_at string required (nullable)
  • bank_account object required (nullable)
    • beneficiary_name string required
    • bank_name string required
    • account_number_last4 string required
    • routing_code string required
    • currency string required one of USD, EUR
  • stellar_wallet object required (nullable)
    • address string required
    • kind string required one of account, contract
  • ownership_proof object optional
    • method string required one of signed_challenge, signed_auth_entry
    • challenge_xdr string required
    • expires_at string required
  • checks object optional
    • account string required one of present, missing
    • trustline string required one of present, missing
    • frozen boolean required
    • offer string required one of sponsored_trustline (nullable)

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties/$ID/archive" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{}'
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/counterparties/{id}/archive", {
  params: { path: { id: "<id>" } },
  body: {},
});
Copied

POST /v1/counterparties/{id}/ownership-proof

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

Parameters

  • id string required in path

Request body

application/json, required

object

  • signed_challenge_xdr string required

Responses

200 Default Response

object

  • id string required
  • type string required one of bank_account, stellar_wallet
  • label string required (nullable)
  • status string required one of pending_verification, active, archived
  • created_at string required
  • verified_at string required (nullable)
  • archived_at string required (nullable)
  • bank_account object required (nullable)
    • beneficiary_name string required
    • bank_name string required
    • account_number_last4 string required
    • routing_code string required
    • currency string required one of USD, EUR
  • stellar_wallet object required (nullable)
    • address string required
    • kind string required one of account, contract
  • ownership_proof object optional
    • method string required one of signed_challenge, signed_auth_entry
    • challenge_xdr string required
    • expires_at string required
  • checks object optional
    • account string required one of present, missing
    • trustline string required one of present, missing
    • frozen boolean required
    • offer string required one of sponsored_trustline (nullable)

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties/$ID/ownership-proof" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"signed_challenge_xdr":"<signed_challenge_xdr>"}'
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/counterparties/{id}/ownership-proof", {
  params: { path: { id: "<id>" } },
  body: {
    "signed_challenge_xdr": "<signed_challenge_xdr>"
  },
});
Copied

POST /v1/counterparties/{id}/ownership-challenge

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

Parameters

  • id string required in path

Request body

application/json, required

object

Responses

200 Default Response

object

  • id string required
  • type string required one of bank_account, stellar_wallet
  • label string required (nullable)
  • status string required one of pending_verification, active, archived
  • created_at string required
  • verified_at string required (nullable)
  • archived_at string required (nullable)
  • bank_account object required (nullable)
    • beneficiary_name string required
    • bank_name string required
    • account_number_last4 string required
    • routing_code string required
    • currency string required one of USD, EUR
  • stellar_wallet object required (nullable)
    • address string required
    • kind string required one of account, contract
  • ownership_proof object optional
    • method string required one of signed_challenge, signed_auth_entry
    • challenge_xdr string required
    • expires_at string required
  • checks object optional
    • account string required one of present, missing
    • trustline string required one of present, missing
    • frozen boolean required
    • offer string required one of sponsored_trustline (nullable)

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties/$ID/ownership-challenge" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{}'
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/counterparties/{id}/ownership-challenge", {
  params: { path: { id: "<id>" } },
  body: {},
});
Copied

POST /v1/counterparties/{id}/sponsored-trustline

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

Parameters

  • id string required in path

Request body

application/json, required

object

Responses

200 Default Response

object

  • counterparty_id string required
  • trustor string required
  • sponsor string required
  • asset object required
    • code string required
    • issuer string required
  • hash string required
  • envelope_xdr string required
  • expires_at string required

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties/$ID/sponsored-trustline" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{}'
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/counterparties/{id}/sponsored-trustline", {
  params: { path: { id: "<id>" } },
  body: {},
});
Copied

POST /v1/counterparties/{id}/sponsored-trustline/submit

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

Parameters

  • id string required in path

Request body

application/json, required

object

  • hash string required
  • signed_envelope_xdr string required

Responses

200 Default Response

object

  • counterparty_id string required
  • hash string required
  • status string required one of pending, duplicate

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

curl

curl -s \
  -X POST \
  "$API/v1/counterparties/$ID/sponsored-trustline/submit" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"hash":"<hash>","signed_envelope_xdr":"<signed_envelope_xdr>"}'
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/counterparties/{id}/sponsored-trustline/submit", {
  params: { path: { id: "<id>" } },
  body: {
    "hash": "<hash>",
    "signed_envelope_xdr": "<signed_envelope_xdr>"
  },
});
Copied

Edit on GitHub