Payment States
A PaysafeCard payment can progress through the following states during its lifecycle:
| Value | Description |
|---|---|
INITIATED | The initial state of a payment after it has been successfully created. |
REDIRECTED | The customer has been redirected to the PaysafeCard payment panel to authorize the payment. |
AUTHORIZED | The payment has been successfully authorized by the customer. |
SUCCESS | The payment has been completed successfully. |
CANCELED_MERCHANT | The payment has been canceled by you, the business partner. |
CANCELED_CUSTOMER | The payment has been canceled by the customer on the payment panel. |
EXPIRED | The payment has expired because the customer did not authorize it within the disposition time window, or because the authorized amount was not captured by the business partner within that time window. |
HTTP Status Codes
| Code | Short Description | Description |
|---|---|---|
| 200 | OK | Everything is OK. |
| 201 | Created | New object was successfully created. |
| 400 | Bad Request | Missing parameter. |
| 401 | Unauthorized | Invalid or expired API key. |
| 404 | Not Found | Not found. This is also returned when you try to retrieve a payment that does not exist. |
| 500 | Internal Server Error | This indicates a general technical error on PaysafeCard's end. |
| 501 | Not Implemented | Version feature not implemented. |
| 502 | Bad Gateway | Invalid response from upstream system. |
| 503 | Service Unavailable | Server overloaded. |
| 504 | Gateway Timeout | Timeout from upstream system. |
Error Codes
| Code | Number (optional) | HTTP Status | Description |
|---|---|---|---|
general_technical_error | 10007 | 500 | General technical error. |
invalid_api_key | 10008 | 401 | Authentication failed due to missing or invalid API key. Your key needs to be set to the HTTP auth username. |
invalid_request_parameter | 10028 | 400 | One of the request parameters failed validation. The message and param fields contain more detailed information. |
duplicate_transaction_id | 2001 | 400 | Transaction already exists. |
payment_invalid_state | 2017 | 400 | The payment is in an invalid state, e.g. you tried to capture a payment that is in state INITIATED instead of AUTHORIZED. |
Merchant with Id XXXXXXXXXX is not active. | 3001 | 400 | Merchant is not active. |
Merchant with Id XXXXXXXXXX is not allowed to perform this debit any more | 3007 | 400 | Debit attempt after expiry of dispo time window. |
submerchant_not_found | 3014 | 400 | The submerchant_id specified has not been configured. |
general_error | 3017 | 400 | It is mandatory to send an MCID. |
general_error | 3019 | 400 | MCID contains invalid values. |
Other errors can be communicated to the customer as “general technical error”. In general when one of these errors occur the business partner should contact PaysafeCard immediately via integration@paysafecard.com if the account is not live. For live accounts, techsupport@paysafecard.com should be contacted.
Below is an example of an error response:
400 Bad Request
{
"code": "invalid_request_parameter"
"message": ""must contain 1-10 digits, followed by a decimal separator '.' followed by 2 digits",
"number": 10028,
"param": "amount"
}
## PaysafeCard error messages
---
Translated PaysafeCard error messages for customers in EN, DE, ES, FR, IT, NL, SV, CZ and PL can be found [*here*](https://www.paysafecard.com/fileadmin/Website/Dokumente/B2B/paysafecard_error_messages.pdf).