Stripe payment request button html css

681 views
Skip to first unread message

Do Tri

unread,
Oct 10, 2018, 4:36:57 PM10/10/18
to Stripe API Discussion
Hi,

Anyone knows how to create the Stripe Payment Request button using html and css so I can use it for other purposes. The styling look very cool !


Thanks!

Remi J.

unread,
Oct 10, 2018, 4:52:29 PM10/10/18
to api-d...@lists.stripe.com
Hello,

I would not recommend re-using this style or button for anything else in your application. You should only use this style for the Payment Request button and in that case you would let Stripe display the button for you since there are strict rules around usage of the button. Apple for example has strict UI requirements and guidelines on what can and can't be displayed for Apple Pay.

Sorry I don't have a better answer but I hope it clarifies the situation!
Best,
Remi

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Borge Strand-Bergesen

unread,
Oct 11, 2018, 10:41:20 AM10/11/18
to api-d...@lists.stripe.com
I've reused a minimal part of it, mainly to get the same width and similar frame for other buttons. I went the cheap and quick way and grabbed the pixels. Basically, I first styled the Apple Pay button according to "Styling the Payment Request Button Element" and giving width: to <div id="payment-request-button">. When I was happy about that I grabbed a screenshot, edited heavily, and inserted the new graphics with width: and padding:. You can probably do the same thing with your own custom .css instead of pixels. 

For the Apple Pay button so far so good, but in the Vivaldi browser on Windows the sleek Apple Pay button is replaced by this hideous purple thing of the same size. It will stand out regardless of other buttons being implemented by css or pixels. I'll work on disabling it. 


Best,
Børge

Børge Strand-Bergesen
bo...@henryaudio.com | Mobile: +47 90 63 99 18
www.henryaudio.com


Reply all
Reply to author
Forward
0 new messages