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.
$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.
| Environment | Base URL | Keys |
|---|---|---|
| Sandbox | https://api-sandbox.coinstars.com | test_… |
| Production | https://api.coinstars.com | live_… |
Create a payment
/v1/checkout/cardCharge a tokenized card. Tokenize first with the Coinstars SDK so raw card data never touches your servers.
Body parameters
| Field | Type | Description |
|---|---|---|
| subtotal | integer | Amount in minor units, before fees. |
| currency | string | ISO-4217 code, e.g. USD. |
| token | string | Card token returned by the SDK. |
| merchantId | string | Your merchant identifier. |
| idempotencyKey | string | Optional. 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
/v1/payoutsSend 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"
}'
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.
| Event | Fires when |
|---|---|
| payment.succeeded | A pay-in is captured and settled. |
| payment.failed | A pay-in is declined or expires. |
| payout.paid | Funds have been delivered to the destination. |
| payout.failed | The destination rejects the payout. |
| chargeback.opened | A 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.
| Code | HTTP | Meaning |
|---|---|---|
| invalid_request | 400 | A required field is missing or malformed. |
| unauthorized | 401 | Missing, rotated or wrong-environment key. |
| card_declined | 402 | Issuer declined the card. |
| sanction_match | 403 | Payout blocked by sanctions screening. |
| rate_limited | 429 | Too many requests — back off and retry. |
| server_error | 500 | Unexpected error; retry with the same idempotency key. |