Skip to content
Developers

Payments

A payment in Spleetz is a bill: an amount owed to the business, which one person pays or several people split. You create it from your server, the customer pays it on the Spleetz pay page or in the Spleetz app, and you hear when it is paid.

POST /transactions fixes what is owed. It is called from your server, so the customer can’t change the amount.

Terminal window
curl https://api.spleetz.com/transactions \
-H "Authorization: ApiKey $SPLEETZ_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountMinor": 4800,
"currency": "GBP",
"reference": "INV-2026-0193",
"itemName": "Order 1042",
"metadata": { "customerId": "C-2231" },
"returnUrl": "https://example.com/checkout/done",
"cancelUrl": "https://example.com/checkout"
}'
Field
amountMinor What is owed, in minor units. Required, unless you send order.
currency ISO 4217 code. Leave it out to charge in the business’s home currency. A currency the business isn’t set up for is refused with 4021.
reference Your own reference, such as an order or invoice number, up to 120 characters. Returned on the payment and in every webhook about it.
metadata String keys and values for your own use. Returned on the payment and in every webhook about it.
itemName What is being paid for, shown to the payer. Up to 200 characters.
itemQuantity How many, 1 to 10,000. Defaults to 1.
returnUrl Where the pay page sends the payer once they have paid.
cancelUrl Where the pay page’s “back” goes before they pay.
items, taxMinor, serviceChargeMinor, discountMinor The order’s lines, so the payers can split the bill by what each had. See Splitting a bill.
handle The payer’s Spleetz handle, if you know it: the payment goes straight to their phone.
recurring Makes the payment repeat. See Recurring bills.
source Connected apps only: which part of your app this payment is for. See Sources.
order An order in a point-of-sale system the business has connected to Spleetz; its lines and total are read from there.

The API reference lists every field with its limits.

The payment session. The fields most integrations use:

Field
transactionId The payment’s id. Every later call and webhook uses it.
payUrl The Spleetz pay page for this payment. Send the customer here.
status Where the payment stands. Pending when new.
isComplete Nothing more will happen to the payment without a new action.
isSuccessful The money was taken: true for Completed, Refunded and PartiallyRefunded.
expiresAt When the payment stops accepting payment, in UTC.
uniqueCode A short code a payer can type or scan to open the payment. Not an id: don’t store it as one.
qrCodeData What to put in a QR code for the Spleetz app to scan.

Send the customer to payUrl. The pay page shows what is owed and offers the ways of paying the business takes. The people paying can split the bill there too. It works in any browser: nobody needs the app.

When the payment is made, the page sends the browser to returnUrl with transactionId and status=paid added:

https://example.com/checkout/done?transactionId=...&status=paid

If the payer goes back before paying, they go to cancelUrl with status=cancelled.

Both must be full https addresses, with no user name or password in them. Any host is accepted, including your own domain.

These addresses are for moving the browser, not for proving payment. Anyone can open them. Confirm a payment from a payment.succeeded webhook, or with GET /transactions/{id}.

Each business chooses how long an online payment stays open, from 5 minutes to 24 hours. A payment not paid by expiresAt becomes Expired and sends payment.expired. A split bill has its own payment deadline, which the business can extend.

Status Meaning
Pending Created. Nobody has started paying.
InProgress A payer has opened it and is choosing how to pay.
Authorizing A payment has been submitted and is being checked with the card provider.
RequiresAuthentication The payer’s bank wants them to confirm, such as 3-D Secure.
Authorized The card is authorised but the money is not taken yet, as on a split bill waiting for its other shares.
Capturing The money is being taken.
Completed Paid. The money was taken.
Failed The payment did not go through.
Expired It ran out of time before it was paid.
Cancelled It was cancelled before it was paid.
PartiallyRefunded Paid, and some of it refunded.
Refunded Paid, and all of it refunded.

Completed, Failed, Expired, Cancelled and Refunded don’t change on their own. Completed and PartiallyRefunded can still be refunded.

GET /transactions/{transactionId} returns one payment. Another business’s payment, or for an app another connection’s, answers 404, so the response never confirms that it exists.

GET /transactions lists them, newest first:

Query
page, pageSize Paging: page from 1, and 1 to 100 items a page (20 if not given).
status Only payments in this status.
createdFrom, createdTo Created on or after, and before, these UTC times.
reference Only payments with exactly this reference.
search Matches the reference, item name or transaction id.
Terminal window
curl "https://api.spleetz.com/transactions?reference=INV-2026-0193" \
-H "Authorization: ApiKey $SPLEETZ_KEY"

A list answers items, totalItems, page, pageSize and totalPages.

POST /transactions/{transactionId}/cancel cancels a payment nobody has paid. It answers 204. A payment that has been paid, or is being paid, is refused. A cancelled payment sends transaction.cancelled.

The API has no idempotency keys. If a POST /transactions times out and you don’t know whether it worked, look for it before you create another: give every payment a unique reference and call GET /transactions?reference=.... If it is there, use it.

A refund is safer: two refunds of the same payment can’t run at once (the second answers 409 with 4016), and nothing can be refunded beyond what was paid.