#MasterGates - Payment Request Button

1 messages · Page 1 of 1 (latest)

runic bobcat
#

Hello! Yes, the Payment Request Button is compatible with Sources, but we do recommend you upgrade to our newer APIs.

untold crystal
#

Do you have any links to documentation that has those payment request button -> sources api examples? It seems everything online only shows the payment intents flows now.

What would be the stripe.js code used to convert a payment request button element into a token for the sources api? I assume it's the stripe.createSource(element, sourceData) method, but I'm unsure.

runic bobcat
#

No, I don't believe we have any sample code for the Payment Request Button with the Sources API. Your assumption is incorrect about the Stripe.js method you need to use. Instead of using stripe.createSource you need to listen for the source event coming from the Payment Request object: https://stripe.com/docs/js/payment_request/events/on_source