Negative Simulation Outcomes - Withdrawals
By including a specific amount in a withdrawal request, you can simulate a range of negative scenarios for PayPal withdrawals in our TEST environment.
- Pass EXTERNAL as the Simulator field value in your request header.
As withdrawals are processed in batches, you need to submit a GET call to /standalonecredits to get the status and simulate the required error scenario.
Withdrawal requests
The table shows details of the PayPal/ Paysafe errors you can simulate by passing the specified amounts in a withdrawal request. Note that in each case, the following codes also apply:
Paysafe HTTP Status Code: 200
Paysafe Error Code: 1001
PayPal Error Code | PayPal Error Description | PayPal Status Code | PayPal Error Details | Paysafe Error Message | Paysafe Error Details | Amount |
---|---|---|---|---|---|---|
ERRPYO001 | SENDER_RESTRICTED | 403 Forbidden | Message: | Authorization error from External Gateway | Authorization error – Sender Restricted | 45.11 |
ERRPYO002 | SENDER_EMAIL_UNCONFIRMED | 403 Forbidden | Message: | Authorization error from External Gateway | Authorization error – Sender email unconfirmed | 45.21 |
ERRPYO003 | AUTHORIZATION_ERROR | 403 Forbidden | Message: | Authorization error from External Gateway | Authorization error | 45.31 |
ERRPYO005 | INSUFFICIENT_FUNDS | 422 Unprocessable Entity | Message: | External Gateway Error | Internal service error – Insufficient funds | 45.41 |
ERRPYO006 | INTERNAL_ERROR | 500 Internal Server Error | Message: | External Gateway Error | Internal service error | 45.51 |
ERRPYO010 | VALIDATION_ERROR | 400 Bad Request | Message: Description: "location": "body", "issue": "Invalid Payload" } | External Gateway Error | Invalid Request – Invalid Payload | 45.61 |
ERRPYO011 | REQUIRED_SCOPE_MISSING | 403 Forbidden | Message: | External Gateway Error | Access token does not have required scope. | 45.71 |
ERRPYO012 | SENDER_LOCKED | 403 Forbidden | Message: | External Gateway Error | Authorization error – Sender locked | 45.81 |
ERRPYO014 | USER_BUSINESS_ERROR | 400 Bad Request | Message: Description: "field": "SENDER_BATCH_ID", "location": "body", "issue": "Batch with given sender_batch_id already exists", "link": [ ] } | External Gateway Error | User business error – Batch with given sender_batch_id already exists | 46.11 |
ERRPYO035 | RATE_LIMIT_VALIDATION |
|
| External Gateway Error | Sorry, we've blocked this request due to multiple invalid requests submitted previously. Please retry the Payout after some time. | 46.21 |
ERRPYO036 | REQUEST_TIMEOUT_EXCEEDED | 504 Gateway Timeout | Message: Please retry after some time. | External Gateway Error | External Gateway Timeout – Please retry after sometime | 46.31 |
ERRPYO037 | SYNC_MODE_NOT_APPLICABLE | 403 Forbidden | Message: You can use the asynchronous mode by specifying sync_mode= false in the request. | External Gateway Error | Synchronous mode will soon be deprecated and is no longer available for new integrations. You can use the asynchronous mode by specifying sync_mode= false in the request. | 46.41 |
ERRPYO038 | NON_HOLDING_CURRENCY | 400 Bad Request | Message: | External Gateway Error | As your PayPal balance is not held in this currency, you'll not be able to send Payouts.
| 46.51 |
ERRPYO039 | PREVIOUS_REQUEST_IN_PROGRESS | 400 Bad Request | Message: Please try after some time. | External Gateway Error | A previous with the same sender batch id is in progress. Please try after some time.
| 46.61 |
ERRPYO040 | CIP_NOT_VERIFIED | 400 Bad Request | Message: | External Gateway Error | Your account is not CIP verified. Please verify your PayPal account and retry the payout.
| 46.71 |
Withdrawal request example
To simulate an INSUFFICIENT_FUNDS error for example, use the amount 45.41:
{
"amount": 4541,
"merchantRefNum": "{{merchantrefnum}}",
"currencyCode": "USD",
"paymentHandleToken":"{{paymenthandletoken}}",
"customerIp": "204.91.0.12",
"description": "Winning payment from Loto 649"
}
Withdrawal response example
{
"error": {
"code": "1001",
"message": "External Gateway Error",
"details": [
"An external gateway error occurred.",
"An internal service error has occurred.",
"INSUFFICIENT_FUNDS"
]
},
"id": "f4163014-2819-4b74-9377-ea1bc1a0c120",
"paymentType": "PAYPAL",
"paymentHandleToken": "PHBKEMNkN6kphFca",
"merchantRefNum": "b3d7efa4-7f01-4158-84ba-73dbfb3f4a08",
"currencyCode": "USD",
"txnTime": "2023-09-29T14:58:28Z",
"billingDetails": {
"street1": "100 Queen",
"street2": "Unit 201",
"city": "Toronto",
"zip": "M5H 2N2",
"country": "CA"
},
"customerIp": "204.91.0.12",
"status": "ERROR",
"gatewayReconciliationId": "AIAAAAAAAAAAAAACGQBA",
"amount": 4541,
"returnLinks": [
{
"rel": "on_failed",
"href": "https://usgaminggamblig.com/payment/return/failed"
},
{
"rel": "on_cancelled",
"href": "https://usgaminggamblig.com/payment/return/cancelled"
},
{
"rel": "default",
"href": "https://usgaminggamblig.com/payment/return/success"
}
],
"liveMode": false,
"simulator": "EXTERNAL",
"updatedTime": "2023-09-29T15:25:49Z",
"statusTime": "2023-09-29T15:25:49Z",
"gatewayResponse": {
"processor": "PAYPAL"
},
"paypal": {
"recipientType": "PAYPAL_ID",
"consumerId": "LK9HZ65GCHVSH",
"consumerMessage": "Paysafe consumer message for sct"
},
"profile": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@paysafe.com"
}
}