"ZERO_OUTSTANDING_BALANCE" issued when capturing authorized payment after creating subscription in "PAYPAL"
P粉450744515
P粉450744515 2024-03-29 12:36:27
0
1
375

The following error occurred while capturing an authorized payment after creating a subscription in PAYPAL. If anyone knows why this is happening or has any solution, please reply.

Code to capture payments given a subscription ID. The content given below contains errors.

$provider = new PayPalClient;
$provider->getAccessToken();
$response = $provider->captureSubscriptionPayment($request->input('subscription_id'), 'capturing payment', (float)$package->price);

mistake:-

`{
    "name":"UNPROCESSABLE_ENTITY",
    "message":"The requested action could not be performed, semantically incorrect, or failed business validation.",
    "debug_id":"2e3384fe1998b",
    "details":[
        {
            "issue":"ZERO_OUTSTANDING_BALANCE",
            "description":"Current outstanding balance should be greater than zero."
        }
    ],
    "links":[
        {
            "href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
            "rel":"information_link","method":"GET"
        }
    ]
}`

{
    "name":"UNPROCESSABLE_ENTITY",
    "message":"The requested action could not be performed, semantically incorrect, or failed business validation.",
    "debug_id":"b1c0f40b4e56b",
    "details":[
        {
            "issue":"AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE",
            "description":"The new outstanding balance can not be greater than the current outstanding balance."
        }
    ],
    "links":[
        {
            "href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
            "rel":"information_link","method":"GET"
        }
    ]
}

Another issue is that after creating products, plans and subscriptions through the API, these created products, plans and subscriptions are not visible in the dashboard (sandbox Paypal account). But when retrieving via api I get all the details. Please tell me why this is happening or where I can see this.

ps: I'm using the https://srmklive.github.io/laravel-paypal/docs.html api to create products/plans/subscriptions.

P粉450744515
P粉450744515

reply all(1)
P粉726234648

PayPal subscriptions are automatically billed based on the plan_id and/or billing_cycles of the overriding plan object when the subscription is created. That's what subscriptions are for.

When automatic payments are not missed, there are no outstanding balances to settle. Payments cannot be captured manually when there is no outstanding balance to be billed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template