Every error from the API, apart from the OAuth endpoints, has the same body:
"message" : " Refund of £30.00 exceeds the remaining refundable balance of £12.00 " ,
"validationErrors" : null ,
"traceId" : " 4f9c2a7e-1d3b-4a8e-9f60-2b7c1e5d8a43 "
Field
message
What went wrong, in plain English, safe to show to the person using your software.
statusCode
The HTTP status, repeated.
errorCode
A stable number to branch on. 0 when the failure has nothing more specific than its HTTP status.
validationErrors
For a request that failed validation: each field’s path, with what is wrong with it.
card
Only for a payment that failed on a card.
traceId
The request’s correlation id, the same as the X-Correlation-ID header. Quote it to support.
Branch on errorCode, not on message: messages can be reworded, codes never change meaning.
The OAuth endpoints, /connect/token and /connect/revoke, answer errors in the OAuth shape
instead (error and error_description). See token errors .
A request that doesn’t match the API’s rules answers 400 with 4012, the first problem in
message, and every problem in validationErrors:
"message" : " The field ItemQuantity must be between 1 and 10000. " ,
"ItemQuantity" : [ " The field ItemQuantity must be between 1 and 10000. " ]
Status
400
The request is not valid. Fix it before trying again.
401
No credentials, or credentials that aren’t valid.
403
The credentials are valid, but may not do this.
404
Not found, or not yours. The API doesn’t tell the two apart.
409
The request is valid, but what it acts on is in the wrong state, such as refunding an unpaid payment.
429
Too many requests. Wait for the seconds in Retry-After.
500
Something went wrong at Spleetz.
502
The payment provider refused or couldn’t be reached.
503
A device the payment depends on can’t be reached right now.
It is safe to retry a 429, 502 or 503 after a wait. For a 500 on a call that creates
something, check whether it was created before you try again; see
Retrying safely .
Code
Status
Meaning
1009
403
Access denied. The message says why: a key for the other server, a secret key sent from a browser, or a key that may not do this.
1010
429
Too many requests.
1011
500
An unexpected error.
8001
403
This endpoint doesn’t take this kind of key.
8008
401
Missing or invalid API key.
Code
Status
Meaning
4001
404
Transaction not found.
4012
400
Validation error. See validationErrors, or the message.
4017
409
This payment has already been processed.
4020
400
The amount is over the business’s maximum transaction amount.
4021
400
The business doesn’t take payments in that currency.
8002
400
Invalid payment amount.
8003
400
The payment couldn’t be created.
8004
404
Payment not found.
8006
400
The payment couldn’t be cancelled, such as one being paid.
8012
502
The payment provider couldn’t do this just now.
9107
409
The business can’t take payments yet: its payment account isn’t set up, or isn’t taking payments.
9113
403
Spleetz has paused payments for this business.
Code
Status
Meaning
4006
502
The provider refused the refund.
4013
409
The payment isn’t refundable: not paid, or already fully refunded.
4014
400
More than is left to refund.
4015
400
The amount must be more than zero.
4016
409
Another refund of this payment is under way.
4022
409
The payment can’t be refunded through Spleetz on the way it was paid, such as cash or a bank transfer.
Code
Status
Meaning
9970
404
No such recurring bill.
9972
400
The recurring terms can’t be used. The message says what to change.
9973
409
The recurring bill has already ended or been cancelled.
9975
400
The business has switched recurring payments off.
Code
Status
Meaning
9955
400
The payment’s source isn’t one the app declares, or a caller that isn’t an app sent one.
9956
403
The business hasn’t approved that source for this connection.
9957
403
The connection hasn’t been approved for the scope this needs.
9958
403
Connected apps can’t use this endpoint.
9959
401
The access token isn’t valid, or has expired. Refresh it.
Code
Status
Meaning
3120
404
No such webhook endpoint.
3121
400
The endpoint can’t be saved. The message says why, such as a live address that isn’t https.