Skip to content

Payments

The Payments API allows you to create, list, and manage payouts to recipients.

Payment States

Payments transition through these states:

CREATED → VALIDATED → QUEUED → PROCESSING → SENT → COMPLETED
    ↓         ↓          ↓          ↓         ↓
  FAILED   FAILED    FAILED     FAILED   RETURNED

Create Payment

POST /api/v1/payments

Create a new payment to a recipient.

bash
curl -X POST https://api.paystream.fi/api/v1/payments \
  -H "Authorization: Bearer psk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "recipientId": "rec_abc123",
    "amount": 10000,
    "currency": "usd",
    "rail": "standard",
    "description": "Weekly payout"
  }'

Request Body

FieldTypeRequiredDescription
recipientIdstringYesRecipient ID
amountintegerYesAmount in cents (e.g., 10000 = $100.00)
currencystringNoCurrency code (default: usd)
railstringNoPayment rail: standard, same_day_ach, rtp, instant
urgencybooleanNoRequest instant processing
descriptionstringNoPayment description
metadataobjectNoCustom metadata

Response

json
{
  "data": {
    "id": "pay_xyz789",
    "recipientId": "rec_abc123",
    "amount": 10000,
    "currency": "usd",
    "rail": "standard",
    "status": "created",
    "description": "Weekly payout",
    "createdAt": "2026-02-19T00:00:00Z"
  }
}

List Payments

GET /api/v1/payments

List all payments with optional filters.

bash
curl -X GET "https://api.paystream.fi/api/v1/payments?status=completed&limit=50" \
  -H "Authorization: Bearer psk_test_xxx"

Query Parameters

ParameterTypeDescription
statusstringFilter by status
recipientIdstringFilter by recipient
startDatestringFilter from date (ISO 8601)
endDatestringFilter to date (ISO 8601)
limitintegerResults per page (default: 50)
cursorstringPagination cursor

Get Payment

GET /api/v1/payments/:id

Get details of a specific payment.

bash
curl -X GET https://api.paystream.fi/api/v1/payments/pay_xyz789 \
  -H "Authorization: Bearer psk_test_xxx"

Cancel Payment

POST /api/v1/payments/:id/cancel

Cancel a payment that hasn't been sent yet.

bash
curl -X POST https://api.paystream.fi/api/v1/payments/pay_xyz789/cancel \
  -H "Authorization: Bearer psk_test_xxx"

Retry Payment

POST /api/v1/payments/:id/retry

Retry a failed payment.

bash
curl -X POST https://api.paystream.fi/api/v1/payments/pay_xyz789/retry \
  -H "Authorization: Bearer psk_test_xxx"

Payment Rails

RailSpeedCostUse Case
standard2-3 business daysFreeRegular payouts
same_day_achSame business day$1.00Urgent ACH
rtp~30 seconds1.5% (min $1, max $30)Instant bank transfer
instant~30 seconds2% (min $1.50, max $50)Push-to-card

Released under the MIT License.