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

Payout batches

3 operations under payout-batches. Examples read $API and $KEY from your shell.

POST /v1/payout-batches

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

    • source object required
      • type string required one of fiat_balance
      • currency string required
    • asset string required
    • csv string optional
    • rows array optional

      Each item:

      • counterparty_id string required
      • amount decimal string required
      • reference string optional
      • address string optional
    • metadata object optional
  2. Variant 2: object

    • retry_of string required
    • metadata object optional

Responses

201 Default Response

object

  • id string required
  • object string required one of payout_batch
  • status string required
  • status_reason string required (nullable)
  • asset string required
  • currency string required
  • total_amount decimal string required
  • counts object required
    • total integer required
    • ready integer required
    • invalid integer required
    • pending integer required
    • success integer required
    • failed integer required
    • canceled integer required
  • retry_of string required (nullable)
  • stellar_tx_hash string required (nullable)
  • version integer required
  • created_at string required
  • completed_at string required (nullable)
  • metadata object required
  • items array required

    Each item:

    • row integer required
    • line integer required (nullable)
    • counterparty_id string required (nullable)
    • counterparty_ref string required
    • address string required
    • amount decimal string required
    • reference string required (nullable)
    • status string required
    • status_reason string required (nullable)
    • stellar_tx_hash string required (nullable)
    • ledger_sequence integer required (nullable)
    • retry_of object required (nullable)
      • batch_id string required
      • row integer required
    • retried_by object required (nullable)
      • batch_id string required
      • row integer required

202 Default Response

object

  • id string required
  • object string required one of payout_batch
  • status string required
  • status_reason string required (nullable)
  • asset string required
  • currency string required
  • total_amount decimal string required
  • counts object required
    • total integer required
    • ready integer required
    • invalid integer required
    • pending integer required
    • success integer required
    • failed integer required
    • canceled integer required
  • retry_of string required (nullable)
  • stellar_tx_hash string required (nullable)
  • version integer required
  • created_at string required
  • completed_at string required (nullable)
  • metadata object required
  • items array required

    Each item:

    • row integer required
    • line integer required (nullable)
    • counterparty_id string required (nullable)
    • counterparty_ref string required
    • address string required
    • amount decimal string required
    • reference string required (nullable)
    • status string required
    • status_reason string required (nullable)
    • stellar_tx_hash string required (nullable)
    • ledger_sequence integer required (nullable)
    • retry_of object required (nullable)
      • batch_id string required
      • row integer required
    • retried_by object required (nullable)
      • batch_id string required
      • row integer required

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

curl

curl -s \
  -X POST \
  "$API/v1/payout-batches" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"source":{"type":"fiat_balance","currency":"<currency>"},"asset":"<asset>"}'
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/payout-batches", {
  body: {
    "source": {
      "type": "fiat_balance",
      "currency": "<currency>"
    },
    "asset": "<asset>"
  },
});
Copied

GET /v1/payout-batches/{id}

Parameters

  • id string required in path

Responses

200 Default Response

object

  • id string required
  • object string required one of payout_batch
  • status string required
  • status_reason string required (nullable)
  • asset string required
  • currency string required
  • total_amount decimal string required
  • counts object required
    • total integer required
    • ready integer required
    • invalid integer required
    • pending integer required
    • success integer required
    • failed integer required
    • canceled integer required
  • retry_of string required (nullable)
  • stellar_tx_hash string required (nullable)
  • version integer required
  • created_at string required
  • completed_at string required (nullable)
  • metadata object required

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

curl

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

GET /v1/payout-batches/{id}/items

Parameters

  • limit integer required in query
  • starting_after integer optional in query
  • id string required in path

Responses

200 Default Response

object

  • data array required

    Each item:

    • row integer required
    • line integer required (nullable)
    • counterparty_id string required (nullable)
    • counterparty_ref string required
    • address string required
    • amount decimal string required
    • reference string required (nullable)
    • status string required
    • status_reason string required (nullable)
    • stellar_tx_hash string required (nullable)
    • ledger_sequence integer required (nullable)
    • retry_of object required (nullable)
      • batch_id string required
      • row integer required
    • retried_by object required (nullable)
      • batch_id string required
      • row integer required
  • has_more boolean required

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

curl

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

Edit on GitHub