cancel
Showing results for 
Search instead for 
Did you mean: 

payout api with nodejs always giving transaction_status:'Pending'.

SOLVED
Highlighted
Contributor

payout api with nodejs always giving transaction_status:'Pending'.

i'm using the payouts service with nodejs.

 transaction is affecting on business and personal account on payment but getting transaction_status pending always

 

when i hit the api with postman transaction_status is "success" but using same api with  'rest-sdk' transaction_status is 'pending' .

how can i verify that payment is successfully done.

 

postman response for same payout_batch_id

 

{
    "batch_header": {
        "payout_batch_id": "K7MZFWBGE37WA",
        "batch_status": "PROCESSING",
        "time_created": "2018-09-10T09:25:28Z",
        "sender_batch_header": {
            "sender_batch_id": "z0u",
            "email_subject": "You have a payment"
        },
        "amount": {
            "currency": "USD",
            "value": "0.99"
        },
        "fees": {
            "currency": "USD",
            "value": "0.02"
        }
    },
    "items": [
        {
            "payout_item_id": "7836J9VZ4NN94",
            "transaction_id": "5M998498F9692745W",
            "transaction_status": "SUCCESS",
            "payout_item_fee": {
                "currency": "USD",
                "value": "0.02"
            },
            "payout_batch_id": "K7MZFWBGE37WA",
            "payout_item": {
                "recipient_type": "EMAIL",
                "amount": {
                    "currency": "USD",
                    "value": "0.99"
                },
                "note": "Thank you.",
                "receiver": "***@**.**",
                "sender_item_id": "item_1"
            },
            "time_processed": "2018-09-10T09:25:46Z",
            "links": [
                {
                    "href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/7836J9VZ4NN94",
                    "rel": "item",
                    "method": "GET",
                    "encType": "application/json"
                }
            ]
        }
    ],
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/payments/payouts/K7MZFWBGE37WA?page_size=1000&page=1",
            "rel": "self",
            "method": "GET",
            "encType": "application/json"
        }
    ]
}

 response using 'rest-sdk'

{
    "batch_header": {
        "payout_batch_id": "K7MZFWBGE37WA",
        "batch_status": "PROCESSING",
        "time_created": "2018-09-10T09:25:28Z",
        "sender_batch_header": {
            "sender_batch_id": "z0u",
            "email_subject": "You have a payment"
        },
        "amount": {
            "currency": "USD",
            "value": "0.99"
        },
        "fees": {
            "currency": "USD",
            "value": "0.02"
        }
    },
    "items": [
        {
            "payout_item_id": "7836J9VZ4NN94",
            "transaction_status": "PENDING",
            "payout_item_fee": {
                "currency": "USD",
                "value": "0.02"
            },
            "payout_batch_id": "K7MZFWBGE37WA",
            "payout_item": {
                "recipient_type": "EMAIL",
                "amount": {
                    "currency": "USD",
                    "value": "0.99"
                },
                "note": "Thank you.",
                "receiver": "***@**.**",
                "sender_item_id": "item_1"
            },
            "links": [
                {
                    "href": "https://api.sandbox.paypal.com/v1/payments/payouts-item/7836J9VZ4NN94",
                    "rel": "item",
                    "method": "GET",
                    "encType": "application/json"
                }
            ]
        }
    ],
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/payments/payouts/K7MZFWBGE37WA?page_size=1000&page=1",
            "rel": "self",
            "method": "GET",
            "encType": "application/json"
        }
    ],
    "httpStatusCode": 200
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
Advisor

Re: payout api with nodejs always giving transaction_status:'Pending'.

You can see emails for sandbox accounts in the Notifications link when viewing the account within your developer.paypal.com account. That's where all emails go for sandbox that would be sent to actual email accounts in production.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
3 REPLIES 3
Advisor

Re: payout api with nodejs always giving transaction_status:'Pending'.

Did you make the REST API request initially, where it showed pending, and then after that you're hitting it with postman to check the status? Maybe it was indeed pending when the call was first made, but now that you're checking it they are showing success because they did complete now..??

Have you looked into using Webhooks for updates on Payout transactions?

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Contributor

Re: payout api with nodejs always giving transaction_status:'Pending'.

hey,
thanks for response!

 

and how can i check the mail regarding payout in sandbox email account where the emails in sandbox are not actual email address or how receiver (sandbox fake email address ) can get email regarding the payment.

Advisor

Re: payout api with nodejs always giving transaction_status:'Pending'.

You can see emails for sandbox accounts in the Notifications link when viewing the account within your developer.paypal.com account. That's where all emails go for sandbox that would be sent to actual email accounts in production.

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!