Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Vue Stripe Checkout also supports subscription or recurring payments.
You must first enable the client-only integration settings in your Stripe dashboard, you also have the option to customize the look and feel of your checkout page. More details.
Product and Price are required to make this work. Whether it's a physical item or a service, it needs to be represented by a product. Each product can have one or more prices.
For example, you can create a software product with different subscription tiers. $10/month, $20/month, and $50/month More details.
Follow the Vue Stripe Checkout example below:
Vue Stripe Checkout also supports one-time card payments.
You must first enable the client-only integration settings in your Stripe dashboard, you also have the option to customize the look and feel of your checkout page. More details.
Product and Price are required to make this work. Whether it's a physical item or a service, it needs to be represented by a product. Each product can have one or more prices.
For example, you can create a T-shirt product, with different prices for different currencies. $20 USD and €15 Euro. More details.
Follow the Vue Stripe Checkout example below:
Interactive session generator to demo checkout using sessions.
Take note that Session
ids are generated from the backend. To know more about sessions visit the documentation.
Prerequisite: Enable Checkout, and Create Products
Create a session using the data from Step 1. Note that the "mode"="payment"
means that you are creating a one-time payment session. Node.js sample here.
Follow this sample code below:
Google Pay & Apple Pay are automatically supported by Stripe Checkout.
No configuration or integration changes are required to enable Apple Pay or Google Pay in Stripe Checkout. These payments are handled the same way as other card payments.
The Google Pay button is displayed in a given Checkout Session if all of the following apply:
Google Pay is enabled for Checkout in your Stripe Dashboard.
The customer is using Google Chrome or Safari.
The customer has a valid card registered with Google Pay.
This ensures that Checkout only displays the Google Pay button to customers who are able to use it.
Here's an example screenshot from Google Chrome running on Arch Linux, see the Google Pay button.
The Apple Pay button is displayed in a given Checkout Session if all of the following apply:
Apple Pay is enabled for Checkout in your Stripe Dashboard.
The customer’s device is running macOS 10.14.1+ or iOS 12.1+.
The customer is using the Safari browser.
The customer has a valid card registered with Apple Pay.
This ensures that Checkout only displays the Apple Pay button to customers who are able to use it.
Use Stripe's prebuilt Checkout to implement one-time payments or subscriptions with your Vue.js applications.
Vue Stripe Checkout also supports checkout using Session Id.
You need to create the session in your backend. This session will return an id
, use that id to checkout the payment.
Follow the Vue Stripe Checkout example below:
You'll notice that when using sessions, you'll only need the session-id
. This is because the session is the representation of all of the information (including success, and cancel URLs) about the payment to be done.
Name | Type | Default | Required | Description |
---|---|---|---|---|
Name | Type | Description |
---|---|---|
Take note that Session
ids are generated from the backend. To know more about sessions visit the .
pk
string
none
Stripe's publishable key, you can retrieve this from your Stripe dashboard.
string
none
The ID of the Checkout Session that is used in Checkout's client and server integration.
array[object]
none
An array of objects representing the items that your customer would like to purchase. These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout. Used with the client-only integration.
boolean
false
Disables the advanced fraud detection feature.
string
none
The mode of the Checkout Session, one of payment or subscription. Required if using lineItems with the client-only integration.
string
none
The URL to which Stripe should send customers when payment is complete. If you’d like access to the Checkout Session for the successful payment, read more about it in the guide on fulfilling orders. Required if using the client-only integration.
string
none
The URL to which Stripe should send customers when payment is canceled. Required if using the client-only integration.
string
none
A unique string to reference the Checkout session. This can be a customer ID, a cart ID, or similar. It is included in the checkout.session.completed webhook and can be used to fulfill the purchase.
string
none
The email address used to create the customer object. If you already know your customer's email address, use this attribute to prefill it on Checkout.
string
none
Specify whether Checkout should collect the customer’s billing address. If set to required, Checkout will attempt to collect the customer’s billing address. If not set or set to auto Checkout will only attempt to collect the billing address when necessary.
object
none
When set, provides configuration for Checkout to collect a shipping address from a customer.
string
none
For usage with Connect only. Specifying a connected account ID (e.g., acct_24BFMpJ1svR5A89k) allows you to perform actions on behalf of that account.
string
none
Override your account's API version.
string
none
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the Submit button. submitType can only be specified when using using line items or SKUs, and not subscriptions. The default is auto. Supported values are: auto, book, donate, pay.
string
auto
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the Submit button. submitType can only be specified when using using line items or SKUs, and not subscriptions. The default is auto. Supported values are: auto, book, donate, pay.
array[object]
none
An array of objects representing the items that your customer would like to purchase. These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout. Using lineItems is preferred.
loading
boolean
Emits the current loading state of the component.
error
object
Emits whatever error the component might encounter, especially the ones from Stripe.