Developers

API reference

One integration for pay-ins, payouts and settlement. Base URL, authentication, endpoints and webhooks — everything you need to go live.

Overview

The Coinstars API lets you accept payments from any customer — cards, bank transfers, wallets — and pay out to users around the world. One integration covers processing, fraud protection, compliance and settlement, so your team can stay focused on product.

Pay-ins

Card, ACH, SEPA, Pix and wallet collections with fraud screening built in.

Payouts

Bank, card and stablecoin payouts to sellers, creators and suppliers.

Settlement

Multi-party splits, FX and scheduled settlement to the destination you choose.

All endpoints are versioned and idempotent. Amounts are always integers in the currency's minor unit — $10.00 is sent as 1000.

Authentication

Every request is authenticated with a bearer token issued in the dashboard. Tokens are scoped per environment and per merchant account. Keep them server-side — never in a mobile app or browser bundle.

# list keys
curl https://api.coinstars.com/v1/keys \
  -H "Authorization: Bearer $COINSTARS_API_KEY"

A request without a valid key returns 401 unauthorized. Keys can be rotated at any time; the previous key stays valid for 24 hours to allow zero-downtime rollover.

Environments

Use the sandbox while you build — it mirrors production behaviour but never moves real money.

EnvironmentBase URLKeys
Sandboxhttps://api-sandbox.coinstars.comtest_…
Productionhttps://api.coinstars.comlive_…

Create a payment

POST/v1/checkout/card

Charge a tokenized card. Tokenize first with the Coinstars SDK so raw card data never touches your servers.

Body parameters

FieldTypeDescription
subtotalintegerAmount in minor units, before fees.
currencystringISO-4217 code, e.g. USD.
tokenstringCard token returned by the SDK.
merchantIdstringYour merchant identifier.
idempotencyKeystringOptional. Same key returns the same payment.

Request

curl https://api.coinstars.com/v1/checkout/card \
  -H "Authorization: Bearer $COINSTARS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subtotal": 1000,
    "currency": "USD",
    "token": "test_pci_token",
    "merchantId": "my_global_business"
  }'

Response

{
  "id": "pay_8f2c1a",
  "status": "authorized",
  "subtotal": 1000,
  "currency": "USD",
  "createdAt": "2026-10-30T09:12:44Z"
}

Create a payout

POST/v1/payouts

Send funds to a seller, creator or supplier. Payout speed depends on the destination rail — bank transfers settle same day in supported countries, card payouts are instant.

Request

curl https://api.coinstars.com/v1/payouts \
  -H "Authorization: Bearer $COINSTARS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25000,
    "currency": "USD",
    "destination": "bank_account_123",
    "speed": "instant",
    "reference": "order_9012"
  }'
Payouts are screened against sanctions lists before they are submitted. A blocked payout returns 403 sanction_match and is never sent.

Webhooks

Subscribe to events in the dashboard. Every delivery is signed — verify the Coinstars-Signature header against your endpoint secret before trusting the payload.

EventFires when
payment.succeededA pay-in is captured and settled.
payment.failedA pay-in is declined or expires.
payout.paidFunds have been delivered to the destination.
payout.failedThe destination rejects the payout.
chargeback.openedA cardholder disputes a payment.
// verify the signature (Node)
const signature = req.headers['coinstars-signature']
const valid = verify(signature, req.rawBody, process.env.WEBHOOK_SECRET)
if (!valid) return res.status(400).end()

Respond with 2xx within 5 seconds. Anything else is retried with exponential backoff for 24 hours.

Errors

Errors return a JSON body with a stable code, a human-readable message, and a requestId you can quote to support.

CodeHTTPMeaning
invalid_request400A required field is missing or malformed.
unauthorized401Missing, rotated or wrong-environment key.
card_declined402Issuer declined the card.
sanction_match403Payout blocked by sanctions screening.
rate_limited429Too many requests — back off and retry.
server_error500Unexpected error; retry with the same idempotency key.
Need sandbox keys or a walkthrough? Talk to the team — we usually reply within one business day.