Sandbox Payouts Being Denied

lachlan_
Contributor
Contributor

Setting up mass payouts, (using the Payouts API) on the sandbox to test it with my web store. I make the call to create the batch and it returns a 201 and the batch is successfully created. I'm able to check the status of my batch using it's ID and for about 12 hours the status remained "PENDING".

 

Checking the batch status again after 24 hours it has been updated to "DENIED" with no error messages or valid links being provided. The response from the status call is as follows:


{
"batch_header": {
"payout_batch_id": "9Y4V3SMUSZ96N",
"batch_status": "DENIED",
"time_created": "2021-07-07T19:39:04Z",
"sender_batch_header": {
"email_subject": "SDK payouts test txn"
},
"funding_source": "BALANCE",
"amount": {
"currency": "GBP",
"value": "103.55"
},
"fees": {
"currency": "GBP",
"value": "0.00"
}
},
"items": [
{
"payout_item_id": "6YQX53CGQGEJJ",
"transaction_status": "FAILED",
"payout_item_fee": {
"currency": "GBP",
"value": "0.00"
},
"payout_batch_id": "9Y4V3SMUSZ96N",
"payout_item": {
"recipient_type": "EMAIL",
"amount": {
"currency": "GBP",
"value": "103.55"
},
"receiver": "[SANDBOX EMAIL]",
"sender_item_id": "7",
"recipient_wallet": "PAYPAL"
},
"errors": {
"name": "UNDEFINED",
"message": "Sorry, an error has occurred. For help, please contact your account manager or our Customer Service team. You can also try sending the Payout after sometime.",
"information_link": "https:\/\/developer.paypal.com\/docs\/api\/payments.payouts-batch\/#errors",
"details": [],
"links": []
},
"links": [
{
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payouts-item\/6YQX53CGQGEJJ",
"rel": "item",
"method": "GET",
"encType": "application\/json"
}
]
}
],
"links": [
{
"href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payouts\/9Y4V3SMUSZ96N?page_size=1000&page=1",
"rel": "self",
"method": "GET",
"encType": "application\/json"
}
]
}

 

I've been trying to set this up for days now and with the lack of clear documentation and long response times for my test batches I'm at my wits end with the paypal APIs, any help would be much appreciated.

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

Danil2
Contributor
Contributor

I resolve it by using PAYPAL_ID, it works for me

 

    var body = new CreatePayoutRequest()
                {
                    SenderBatchHeader = new SenderBatchHeader()
                    {
                        EmailMessage = "Subscription refund",
                        EmailSubject = "You recieved a payout",
                        RecipientType = "PAYPAL_ID"
                    },
                    Items = new List<PayoutsSdk.Payouts.PayoutItem>(){
                        new PayoutsSdk.Payouts.PayoutItem()
                        {
                            RecipientType="PAYPAL_ID",
                            Amount = new PayoutsSdk.Payouts.Currency(){
                                CurrencyCode = subscription.BillingInfo.LastPayment.Amount.CurrencyCode,
                                Value = amountToRefund.ToString()
                            },
                            Receiver = subscription.Subscriber.PayerId
                        }
                    }
                };

 



View solution in original post

Login to Me Too
6 REPLIES 6

Danil2
Contributor
Contributor

I have same problem. Did you get the solution? 🙂

Login to Me Too

lachlan_
Contributor
Contributor

Apparently it is a known issue and they are working on it, but no ETA as of yet 😞

Login to Me Too
Solved

Danil2
Contributor
Contributor

I resolve it by using PAYPAL_ID, it works for me

 

    var body = new CreatePayoutRequest()
                {
                    SenderBatchHeader = new SenderBatchHeader()
                    {
                        EmailMessage = "Subscription refund",
                        EmailSubject = "You recieved a payout",
                        RecipientType = "PAYPAL_ID"
                    },
                    Items = new List<PayoutsSdk.Payouts.PayoutItem>(){
                        new PayoutsSdk.Payouts.PayoutItem()
                        {
                            RecipientType="PAYPAL_ID",
                            Amount = new PayoutsSdk.Payouts.Currency(){
                                CurrencyCode = subscription.BillingInfo.LastPayment.Amount.CurrencyCode,
                                Value = amountToRefund.ToString()
                            },
                            Receiver = subscription.Subscriber.PayerId
                        }
                    }
                };

 



Login to Me Too

maybesomemore
New Community Member

thanks for solution

Login to Me Too

Danil2
Contributor
Contributor

Just tried with email, it works too

Login to Me Too

lachlan_
Contributor
Contributor

All seems to be working now! 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.