PayPal Checkout - Tell if Client ID is sandbox or production
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to tell if the Client ID or Client Secret is sandbox or production?
The reason why is to show a merchant that they are using sandbox credentials and not live ones. Like with Stripe they start with pk_test_ and sk_test_ so you know test credentials are being used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm guessing that your code is not the original source of the client ids. And that you are using V2 in JS e.g. in the html ...
<script src="https://www.paypal.com/sdk/js?currency=AUD&client-id=ShowClientIdHere"></script>
In my case, I know the sandbox and production client ids for our shop so it's not an issue. I assume you are receiving them from somewhere else?
The only thing I can say to help is that in my case, the sandbox client id includes an underscore and a dash (hyphen), and the production one does not.
Maybe that's a pattern you could use if it applies for your cases too. They are the same string length, so that's not a discriminator.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Paypal express checkout, payment they error "Sorry, something went wrong. Please try again." in PayPal Payments Standard
- Change the button from Sandbox to Production in REST APIs
- Re: Enable the return of billing address in Sandbox Environment
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment