Take payments
Create a payment for an amount. Send the customer to the Spleetz pay page, or show its QR code, and hear by webhook when it is paid. Payments
{
"transactionId": "0193a5c2-7f4e...",
"status": "Pending",
"amountMinor": 4800,
"currency": "GBP",
"reference": "order-1042",
"payUrl": "https://pay.spleetz.com/pay/K7MP4QRT"
}
Get a sandbox key. Sign up at dashboard.spleetz.com,
switch on Test mode, and create a secret key under Settings > API keys. It starts
sk_test_.
Create a payment from your server:
curl https://api-sandbox.spleetz.com/transactions \ -H "Authorization: ApiKey $SPLEETZ_KEY" \ -H "Content-Type: application/json" \ -d '{ "amountMinor": 4800, "currency": "GBP", "reference": "order-1042" }'Send the customer to payUrl from the response, pay with a test card, and watch the
payment arrive as a payment.succeeded webhook.
The full walk-through covers test cards, webhooks and going live.
Take payments
Create a payment for an amount. Send the customer to the Spleetz pay page, or show its QR code, and hear by webhook when it is paid. Payments
Split bills
Send the order’s lines with the payment. The people paying split it by shares or by what each of them had, and each pays their own part. Splitting a bill
Recurring bills
Make a payment repeat every week, month or year. Each period is a bill of its own, paid automatically from the Spleetz app or by an emailed link. Recurring bills
Refunds and payouts
Refund in whole or in part, down to one person’s share, and read the payouts made to the business’s bank account. Refunds
See Authentication for both.
Spleetz runs two separate deployments. They share nothing but your sign-in.
| Live | Sandbox | |
|---|---|---|
| Base URL | https://api.spleetz.com |
https://api-sandbox.spleetz.com |
| Secret keys | sk_live_... |
sk_test_... |
| Money | Real | Test only |
| Dashboard | dashboard.spleetz.com | The same dashboard, with Test mode on |
A key works only on its own server. A test key sent to the live API, or a live key sent to the
sandbox, is refused with 403. See Sandbox and testing.
camelCase field names.1250 is 12.50. A currency
with no minor unit, such as JPY, is sent in whole units; one with three decimals, such as KWD,
in thousandths.Z."Card", never as numbers.X-Correlation-ID header, and every error body the same value as
traceId. Send your own X-Correlation-ID and it is used instead. Quote it if you contact
support.The API is version 1. You don’t need to send a version: requests with none get version 1.
New fields, new event types and new endpoints can be added to version 1 at any time. Write your code to ignore fields and event types it doesn’t know. The changelog lists every change.
Each client IP address can make 300 requests a minute to the API. Over that, the API answers
429 Too Many Requests with a Retry-After header giving the seconds to wait.