Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paddle Billing Client Tokens & docs tweaks #895

Merged
merged 9 commits into from
Nov 6, 2023

Conversation

deanpcmad
Copy link
Contributor

@deanpcmad deanpcmad commented Nov 5, 2023

Paddle have recently added client side tokens as a way to interact with the Paddle API using Paddle.js without exposing your API tokens. Paddle recommend using these instead of passing the seller option, as new features may require it.

The latest feature of Paddle.js is the ability to generate localised price previews on the fly, which is great for building pricing pages as it shows the customer's local currency (with taxes too). This was a feature I've been requesting since the start as the previous version had it too.

This PR adds client_token to PaddleBilling, which is set by environment variables or in the credentials/secrets files.

I've also updated the Paddle Billing subscription docs and renamed some Pay::Paddle examples to Pay::PaddleClassic

@excid3
Copy link
Collaborator

excid3 commented Nov 6, 2023

I missed the client side token change. Good to know! 👍

Thanks for these!

@excid3 excid3 added the Paddle label Nov 6, 2023
@excid3
Copy link
Collaborator

excid3 commented Nov 6, 2023

I assume we should remove the seller_id too while we're here then since we haven't released this?

Looks like it:

Existing methods that use seller will continue to work, but future methods may require client-side tokens. We recommend that you replace the seller parameter with token and a client-side token when you're next reviewing your code.

@excid3 excid3 merged commit c960bb9 into pay-rails:main Nov 6, 2023
36 checks passed
@deanpcmad deanpcmad deleted the paddle-billing-client-tokens branch November 6, 2023 17:20
@deanpcmad
Copy link
Contributor Author

Ah nice, was just about to do that but I can see you've already done it 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants