Kylie
Kylie

Reputation: 11749

Stripe checkout PAY button change text

How to change the text in a stripe checkout modal box from PAY to something else.

I know I can do custom text on the button that pops up the modal.

description: 'ADD CARD',
label:'ADD CARD',

But on the actual modal window. It still just says PAY on the button. I want it to say ADD CARD.

Upvotes: 15

Views: 17961

Answers (6)

Aarthi Geereddy
Aarthi Geereddy

Reputation: 1

Thank you it worked for me.

  await handler.open({
      image: this.logoData.thumbnail,
      name: "STRIPE PAYMENT",
      description: "Hydro",
      amount: this.amountStripe * 100,
      email: this.email,
      currency: "CAD",
      panelLabel: "Authorize",
    });

Upvotes: 0

rambabu
rambabu

Reputation: 1

    await handler.open({
      image: this.logoData.thumbnail,
      name: "STRIPE PAYMENT",
      description: "Hydro",
      amount: this.amountStripe * 100,
      email: this.email,
      currency: "CAD",
      panelLabel: "Authorize",
    });

Add panelLabel in handler.open function it'll change the button text

Upvotes: 0

marcusbass323
marcusbass323

Reputation: 11

All you have to do is use label as a property within StripeCheckout

Example:

<StripeCheckout label="Your text here" />

Upvotes: 0

alesmit
alesmit

Reputation: 56

Staying at the Stripe Checkout Reference, is only possible to edit the label attribute when using the Simple integration (via the data-* attributes).

EDIT

With the Custom integration is possible to set the button text in the panelLabel attribute.

Upvotes: 3

Marios Fakiolas
Marios Fakiolas

Reputation: 1545

With the simple integration also you can do:

data-label="Donate"

Upvotes: 18

floatingLomas
floatingLomas

Reputation: 8727

You can customize that with the data-panel-label or panelLabel option: https://stripe.com/docs/checkout#optional

Upvotes: 15

Related Questions