Skip to content Skip to sidebar Skip to footer

How Do I Test Paypal Subscription Buttons With Sandbox?

after 5 hours of research and reading outdated paypal documentation I finally give up! I need to test a simple paypal subscription button with the paypal sandbox. Button Code: <

Solution 1:

The problem is that you've generated a 'hosted' PayPal button in the live PayPal website, but you're sending this data to the Sandbox.
Since the hosted_button_id isn't recognized in the Sandbox, it returns an error.

You'd need to either:

  • Create a non-hosted button, and change the 'action' and 'business' parameters to match Sandbox details
  • Create a new 'hosted' button in Sandbox via www.sandbox.paypal.com > Profile > PayPal Buttons.

TL;DR: Sandbox is 100% separated from the Live PayPal website. A hosted button generated in Live, doesn't work in Sandbox.


Solution 2:

Just a short add how to make the hosted button in the sandbox:

  1. Create and log in to your sandbox account on https://developer.paypal.com/
  2. Choose "Test Accounts".
  3. Create a "Preconfigured" test account for a seller, make sure you remember the password, and make sure the password contain numbers or you will not be able to log in with it.
  4. Click the yellow button "Enter Sandbox Test Site".
  5. My Account >> Profile >> Selling Preferences >> My Saved Buttons
  6. Edit your button. (There are 3 "saved" pre-made buttons there.) Make sure you dont dwell too long, it logged me out without telling me so and I got a blank code field first time I fiddled with my button.

Hopefully this saved you some time :)


Solution 3:

Perhaps this will help: https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ButtonMgrAPIIntro

Not all merchants in every country can use all the buttons that can be created. For example, German merchants cannot use Subscribe buttons even though they can be created through the API


Solution 4:

Yes, you can test also on sandbox with following steps:

  1. Create a new sandbox business account.
  2. Login to the business account.
  3. Go with profile > My setting tools.
  4. Click on Paypal buttons > Update.
  5. Click on "Create new button".
  6. Fill up all following details you required.
  7. At last, you can get the form code with "hosted_id".
  8. You can paste the code in your website and you can test it.

Hope, These steps are useful to you.


Solution 5:

This is now:

  1. Create a new sandbox business account.
  2. Login to the sandbox business account using https://www.sandbox.paypal.com/.
  3. Click on "pay and get paid" then "PayPal buttons".
  4. Choose "Buy Now" for the simple PayPal button which does not use an API call.

It is possible this button is now deprecated because the developer site does not seem to have it anymore.


Post a Comment for "How Do I Test Paypal Subscription Buttons With Sandbox?"