skip to Main Content

How could I find the seller_receivable_breakdown field from Paypal v2 API?

When I capture the payment, I don’t get a seller_receivable_breakdown back in the API response, which should contain the net_amount.

Is there a reason why?

API Response:

{
"create_time": "2020-05-08T18:06:08Z",
"id": "35W12417YE077383Y",
"intent": "CAPTURE",
"links": [
    {
        "href": "https://api.sandbox.paypal.com/v2/checkout/orders/35W12417YE077383Y",
        "method": "GET",
        "rel": "self",
        "title": "GET"
    }
],
"payer": {
    "address": {
        "country_code": "SG"
    },
    "email_address": "[email protected]",
    "name": {
        "given_name": "John",
        "surname": "Doe"
    },
    "payer_id": "ZMVMLDB2Q3RNS"
},
"purchase_units": [
    {
        "amount": {
            "currency_code": "USD",
            "value": "76.00"
        },
        "payee": {
            "email_address": "[email protected]",
            "merchant_id": "9D3W7QWY9MULE"
        },
        "payments": {
            "captures": [
                {
                    "amount": {
                        "currency_code": "USD",
                        "value": "76.00"
                    },
                    "create_time": "2020-05-08T18:06:37Z",
                    "final_capture": true,
                    "id": "1DU784512L090023U",
                    "links": [
                        {
                            "href": "https://api.sandbox.paypal.com/v2/payments/captures/1DU784512L090023U",
                            "method": "GET",
                            "rel": "self",
                            "title": "GET"
                        },
                        {
                            "href": "https://api.sandbox.paypal.com/v2/payments/captures/1DU784512L090023U/refund",
                            "method": "POST",
                            "rel": "refund",
                            "title": "POST"
                        },
                        {
                            "href": "https://api.sandbox.paypal.com/v2/checkout/orders/35W12417YE077383Y",
                            "method": "GET",
                            "rel": "up",
                            "title": "GET"
                        }
                    ],
                    "seller_protection": {
                        "dispute_categories": [
                            "ITEM_NOT_RECEIVED",
                            "UNAUTHORIZED_TRANSACTION"
                        ],
                        "status": "ELIGIBLE"
                    },
                    "status": "COMPLETED",
                    "update_time": "2020-05-08T18:06:37Z"
                }
            ]
        },
        "reference_id": "default",
        "shipping": {
            "address": {
                "address_line_1": "123 Thomson Rd.",
                "admin_area_1": "SG_zip = 308123",
                "admin_area_2": "Singapore",
                "country_code": "SG",
                "postal_code": "308123"
            },
            "name": {
                "full_name": "Doe John"
            }
        }
    }
],
"status": "COMPLETED",
"update_time": "2020-05-08T18:06:37Z"
}

3

Answers


  1. Either it may not be there in sandbox mode, or you may need to do a get operation on the capture id.

    https://developer.paypal.com/docs/api/payments/v2/#captures_get

    Login or Signup to reply.
  2. I contacted PayPal support about this and this is their response:
    Unfortunately, it looks like the capture response will not include the "seller_receivable_breakdown" if the capture is still pending. You can see that mentioned under the "seller_receivable_breakdown" variable in this documentation about the captures object. If the capture is pending or processing still, (this happens often when a customer opts for a card transaction rather than a PayPal account balance transaction), then the capture response won’t show the seller_receivable_breakdown but you can call for details on the capture right after it has finished to then see that object.

    Login or Signup to reply.
  3. PayPal may hold a "suspicious" transaction for few days and the transaction is in a "Pending" state during the hold. Some transaction might even require your personal approval. While the transaction is on hold you cannot get the seller_receivable_breakdown via API (though this data is available in the dashboard).

    You can setup a WebHook to fire on "Payment capture completed" and retrieve the information there. Be ready that the WebHook might fire in couple of days after the order.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search