How to retrieve merchant integration status through the API?

Glenatron
Contributor
Contributor

I am trying to onboard partner merchants through the REST api, and I can log-in and generate a sign-up link successfully. Now I want to find out whether the merchant has completed onboarding and the approach I was planning to use was to make an API call as Documented in the "track seller onboarding status" page.

 

The problem is that whatever I put into that call I just seem to get a 404 response back. The documentation says:

You can also query it directly by the tracking ID you specified in the Partner Referrals call by calling GET /v1/customer/partners/partner_id/merchant-integrations?tracking_id={tracking_id}

 

I assumed that here it when it says "partner_id" I should be using my Merchant Id, but I've tried it both ways, calling GET https://api-m.sandbox.paypal.com/v1/customer/partners/ABC123DEF456/merchant_integrations?tracking_id=my-tracking-id with my Authorization: Bearer ... authentication token and always returns a 404.

I think I have tried with every merchant Id in all my partner companies, so as far as I know it should be working with one of them. Is this because I'm trying to access a v1 endpoint with a v2 authorization code? I don't see any record of the calls on my developer dashboard at all, but I do see the other calls I have made, both successful and unsuccessful.

Login to Me Too
9 REPLIES 9

Glenatron
Contributor
Contributor

Alright, so problem one I was calling merchant_integrations instead of merchant-integrations - that's on me. Now I get a simple response like:

{
    "name": "VALIDATION_ERROR",
    "message": "Invalid request",
    "debug_id": "123456789abcde"
}

 Is this because I'm using an Oauth token with the Authorisation: Bearer header instead of the very complicated JSON object documented in the v1 API documentation? If so, how do I create that object? The Oauth login is being generated from a v1 endpoint - is there a different endpoint I need to use to be able to access the deprecated API? And why can't I get this information from a non-deprecated API - should I be finding this in a different way?

Login to Me Too

Kavyar
Moderator
Moderator

Good day @Glenatron 

 

Thank you for posting to the PayPal community.

 

I would suggest to please contact your website developer or the third party eCommerce support to cross check your using same SANDBOX/LIVE REST API Credentials(Client ID & Secret) while performing the below API calls.

 

https://developer.paypal.com/api/rest/authentication/

https://developer.paypal.com/api/rest/postman/ 

 

Important: Please note that it is important to utilize the token within 24 hours. If it is not used within this timeframe, you will need to generate a new token.

 

If you are still experiencing issues, please create an MTS ticket via the following URL  - https://www.paypal-support.com/s/?language=en_US  .Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Glenatron
Contributor
Contributor

Thanks, I am the developer in this case so I'm very confident that the credentials I'm using are the same ones I used to set up the partner onboarding - they're the only ones in the system right now. I have set up a support ticket and I'll add the solution here when we figure it out.

Login to Me Too

munroe7
Member
Member

Did you ever get this resolved? Same thing here, I provide my merchant id and the sandbox seller merchant id and it always returns 404. I'm positive that my access token is correct in the header because I use that on other calls without issues. 

 

        const url = `https://api-m.sandbox.paypal.com/v1/customer/partners/${process.env.PAYPAL_MERCHANT_ID}/merchant-integrations/${sellerMerchantId}`;
 
Login to Me Too

zylvie
Contributor
Contributor

Did you find a solution to this?

 

I have the exact same issue...

Login to Me Too

Glenatron
Contributor
Contributor

The process I have now is to call:
GET https://api-m.sandbox.paypal.com/v1/customer/partners/AB1CD2345EFG/merchant-integrations?tracking_id=my-tracking-id 
That should return a response that contains a merchant_id field - once I have that I can call the integration endpoint:
GET https://api-m.sandbox.paypal.com/v1/customer/partners/AB1CD2345EFG/merchant-integrations/MERCHANT_ID Which will give me details of the integration once they are complete.

 

If they aren't complete, the initial call will give a RESOURCE_NOT_FOUND_ERROR response.

Login to Me Too

zylvie
Contributor
Contributor

@Glenatron How/Where did you get my-tracking-id?

Login to Me Too

zylvie
Contributor
Contributor

@Glenatron Also, do you mind sharing what your request headers look like for both endpoints?

Login to Me Too

Glenatron
Contributor
Contributor

@zylvie The tracking id is the one that I created in the original /v2/customer/partner-referrals call - there's a top level property called "tracking_id" on the object you post in.

My headers for both simply the standard auth and content type ones.

Authorization: Bearer ABCD1234DEFG4321UA

Content-Type: application/json

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.