Errors
Ledgerline uses conventional HTTP status codes to indicate success or failure. Codes in the 2xx range mean success, 4xx mean the request was wrong, and 5xx mean something went wrong on our side (these are rare).
HTTP status codes
Code | Summary |
|---|---|
| Everything worked as expected. |
| The request was unacceptable, often a missing parameter. |
| No valid API key was provided. |
| The parameters were valid but the request failed. |
| The requested resource doesn't exist. |
| The request conflicts with another request (perhaps the same idempotency key). |
| Too many requests hit the API too quickly. |
| Something went wrong on Ledgerline's end. |
Error types
Type | Description |
|---|---|
| A temporary problem with Ledgerline's servers. |
| The card can't be charged; the message is safe to show your customer. |
| A key was reused with different parameters. |
| The request has invalid parameters. |
The error object
{
"error": {
"type": "card_error",
"code": "card_declined",
"decline_code": "insufficient_funds",
"message": "Your card has insufficient funds.",
"param": "payment_method",
"request_log_url": "https://dashboard.ledgerline.dev/logs/req_7Lx…"
}
}