resource not found in sandbox, ok in live

MickaelBNeron
Contributor
Contributor

Title. I can get my plans and products (which were created via the business account portal) in live (using the api url, client id, and client secret for live. The client id and client secret were generated from the business accouns portal), but when I change the url, client id, and client secret to the one created by default in sandbox, suddenly I don't see the plans and products.

How can I access the products and sub plans created via the business portal in sandbox?

Login to Me Too
6 REPLIES 6

MTS_Jennifer
Moderator
Moderator

Hello @MickaelBNeron ,

Thank you for posting to the PayPal Sandbox Community.

If you are attempting to view products and plans created in live in the Sandbox API, you will not see these products and plans. Sandbox and live servers are kept completely separate, so in order to see the sandbox plans and products, you will have had to create them in sandbox.

 

This can be done via API or the sandbox account.

Here is the API information:

https://developer.paypal.com/docs/subscriptions/integrate/

 

To create the plans in a sandbox account here are the steps:

  • Log into the sandbox account at https://sandbox.paypal.com
  • Click on Pay & Get Paid
  • Click on Subscriptions under Accept Payments
  • Click Subscription Plans
  • Click Create Plan
  • Create a product
  • Choose the product for the plan
  • Fill in the information click continue
  • Click finish

Once you have plans and subscriptions created in Sandbox, you will be able to use your sandbox credentials to view any Products and Plans associated with your sandbox account.

This API call will list all Plans:

https://developer.paypal.com/docs/api/subscriptions/v1/#plans_list

This one will show Plan Details:

https://developer.paypal.com/docs/api/subscriptions/v1/#plans_get

This one will show subscription Details:

https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_get

 

Sandbox and live are kept completely separate, so any plans created in sandbox will not show in live, and any plans created in live will not show in sandbox.

 

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

MickaelBNeron
Contributor
Contributor

Thank you for your answer @MTS_Jennifer . However, there's still an issue.

After creating a test plan in sandbox.paypal.com, I try to login to developer.paypal.com to create test accounts and test cards, but if I use the same login and password I used for sandbox.paypal.com, then I cannot login, and if I use the login my client created for me to access the API for his live business account, then the default sandbox app isn't connected to the app used in sandbox.paypal.com where I created the plan. Makes sense?

So, after creating a plan in sandbox.paypal.com, how can I have a developer account that will have access to that app, or use my current developer account to access this app?

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @MickaelBNeron 

Thank you for your response. If your sandbox account is not attached to a different developer account, you can connect your sandbox account to Developer.

Here is how:

  • Log into PayPal Developer dashboard (Live email and password) https://developer.paypal.com
  • Hover over Testing Tools
  • Click on Sandbox accounts
  • Click on Link other sandbox accounts to this developer account
  • Log into your sandbox account
  • Link the account

Once you have linked the sandbox account, you will need to created an app to associate with that sandbox account.

  • Click on Apps & Credentials
  • Click Create App
  • In the drop down for Sandbox Account, choose your sandbox email that you linked
  • Fill in the information
  • Create the app

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

MickaelBNeron
Contributor
Contributor

@MTS_Jennifer Another related issue.

How can I create webhooks for my app? Again, when I log into the developer section, I don't see the app that I used to create the test plan. Since I don't see that app, how can I create webhooks for it?

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello @MickaelBNeron,

Thank you for your response. Once you create the app, you can add a webhook listener url to the app.

When you are logged into the dashboard

  • Click on Apps & Credentials
  • Click on your app
  • Scroll down to the bottom
  • Add the webhook listener URL
  • Subscribe to webhooks
  • Save Changes

Here are the details for creating a webhook listener url:

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

 

If you cannot create a webhook listener you can use https://webhook.site a test webhook listener url will be created for you. You can add that to your sandbox app.

Thank you,

Jennifer

MTS

PayPal

 

Login to Me Too

MickaelBNeron
Contributor
Contributor

@MTS_Jennifer Never mind, now the sandbox account shows up in the developer portal when creating a new app.

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.