How to get list of available payment methods
To get a list of payment methods available for a particular user:
- Add the
psdk-payment-methods
component to the HTML markup of the payment UI.
Copy
- html
1<psdk-payment-methods country="US"></psdk-payment-methods>
- Add the handling of the
selectionChange
event for the payment method selection.
Copy
- typescript
1const paymentMethods = document.querySelector('psdk-payment-methods');
2paymentMethods?.addEventListener('selectionChange', (event) => {
3 console.log(event.detail);
4});
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.