This method does not support metadata
.
You need to enable the Checkout client-only integration
within the Stripe Checkout settings.
Flow.ai supports only One-time purchase products
. Double check you have chosen the proper option when creating a new Stripe product.
async payload => {
const url = await payments.preparedPurchase.stripe({
key: 'your_stripe_publishable_key',
locale: 'nl',
collectAddress: true,
submitType: 'donate',
items: [
{
sku: 'sku_of_your_product', quantity: 1
},
{
sku: 'sku_of_your_another_product', quantity: 3
}
],
onSuccess: {
eventName: 'bought',
params: [
new Param('category', 'clothes')
]
},
onFailure: {
eventName: 'not bought',
params: [
new Param('category', 'clothes')
]
}
})
const buttons = new Buttons('Purchase my items')
buttons.addButton(new Button({
label: 'Click to purchase',
type: 'payment',
value: url
}))
const message = new Message(`Purchase items here ${url}`)
message.addResponse(buttons)
return message
}
Property | Type | Example | Description | Required |
---|---|---|---|---|
key |
string |
pk_test_XXXXXXXXXXX | Your Stripe Publishable Key | Yes |
collectAddress |
boolean |
true | Whether Checkout should collect customer's address | |
locale |
string |
nl | By default, Checkout detects the locale of the customer’s browser and displays a translated version of the page in their language, if it is supported. You can also provide a specific locale for Checkout to use instead | |
submitType |
string |
donate | Submit type of payment session | |
button.label |
string |
Click to purchase | Label of the confirmation button |
You can include onSuccess
and onFailure
configuration which will be used in corresponding situations.
Property | Type | Example | Description | Required |
---|---|---|---|---|
eventName |
string |
bought | Event name to trigger when items are successfully bought / purchase is rejected | |
params |
array |
new Param('productiId', 112234) |
Parameters that are set when the items are bought / purchase is rejected |
The multiple select is based on a number of items. Each individual item should contain sku
and quantity
properties.
Property | Type | Example | Description | Required |
---|---|---|---|---|
sku |
string |
sku_XXXXXXXXXXX | SKU of your product | Yes |
quantity |
number |
1 | Amount of items to be purchased | Yes |
This method does not support metadata
.
You need to enable the Checkout client-only integration
within the Stripe Checkout settings.
Flow.ai supports only One-time purchase products
. Double check you have chosen the proper option when creating a new Stripe product.
async payload => {
const url = await payments.preparedPurchase.stripe({
key: 'your_stripe_publishable_key',
locale: 'nl',
collectAddress: true,
submitType: 'donate',
items: [
{
sku: 'sku_of_your_product', quantity: 1
},
{
sku: 'sku_of_your_another_product', quantity: 3
}
],
onSuccess: {
eventName: 'bought',
params: [
new Param('category', 'clothes')
]
},
onFailure: {
eventName: 'not bought',
params: [
new Param('category', 'clothes')
]
}
})
const buttons = new Buttons('Purchase my items')
buttons.addButton(new Button({
label: 'Click to purchase',
type: 'payment',
value: url
}))
const message = new Message(`Purchase items here ${url}`)
message.addResponse(buttons)
return message
}
Property | Type | Example | Description | Required |
---|---|---|---|---|
key |
string |
pk_test_XXXXXXXXXXX | Your Stripe Publishable Key | Yes |
collectAddress |
boolean |
true | Whether Checkout should collect customer's address | |
locale |
string |
nl | By default, Checkout detects the locale of the customer’s browser and displays a translated version of the page in their language, if it is supported. You can also provide a specific locale for Checkout to use instead | |
submitType |
string |
donate | Submit type of payment session | |
button.label |
string |
Click to purchase | Label of the confirmation button |
You can include onSuccess
and onFailure
configuration which will be used in corresponding situations.
Property | Type | Example | Description | Required |
---|---|---|---|---|
eventName |
string |
bought | Event name to trigger when items are successfully bought / purchase is rejected | |
params |
array |
new Param('productiId', 112234) |
Parameters that are set when the items are bought / purchase is rejected |
The multiple select is based on a number of items. Each individual item should contain sku
and quantity
properties.
Property | Type | Example | Description | Required |
---|---|---|---|---|
sku |
string |
sku_XXXXXXXXXXX | SKU of your product | Yes |
quantity |
number |
1 | Amount of items to be purchased | Yes |
This method does not support metadata
.
You need to enable the Checkout client-only integration
within the Stripe Checkout settings.
Flow.ai supports only One-time purchase products
. Double check you have chosen the proper option when creating a new Stripe product.
async payload => {
const url = await payments.preparedPurchase.stripe({
key: 'your_stripe_publishable_key',
locale: 'nl',
collectAddress: true,
submitType: 'donate',
items: [
{
sku: 'sku_of_your_product', quantity: 1
},
{
sku: 'sku_of_your_another_product', quantity: 3
}
],
onSuccess: {
eventName: 'bought',
params: [
new Param('category', 'clothes')
]
},
onFailure: {
eventName: 'not bought',
params: [
new Param('category', 'clothes')
]
}
})
const buttons = new Buttons('Purchase my items')
buttons.addButton(new Button({
label: 'Click to purchase',
type: 'payment',
value: url
}))
const message = new Message(`Purchase items here ${url}`)
message.addResponse(buttons)
return message
}
Property | Type | Example | Description | Required |
---|---|---|---|---|
key |
string |
pk_test_XXXXXXXXXXX | Your Stripe Publishable Key | Yes |
collectAddress |
boolean |
true | Whether Checkout should collect customer's address | |
locale |
string |
nl | By default, Checkout detects the locale of the customer’s browser and displays a translated version of the page in their language, if it is supported. You can also provide a specific locale for Checkout to use instead | |
submitType |
string |
donate | Submit type of payment session | |
button.label |
string |
Click to purchase | Label of the confirmation button |
You can include onSuccess
and onFailure
configuration which will be used in corresponding situations.
Property | Type | Example | Description | Required |
---|---|---|---|---|
eventName |
string |
bought | Event name to trigger when items are successfully bought / purchase is rejected | |
params |
array |
new Param('productiId', 112234) |
Parameters that are set when the items are bought / purchase is rejected |
The multiple select is based on a number of items. Each individual item should contain sku
and quantity
properties.
Property | Type | Example | Description | Required |
---|---|---|---|---|
sku |
string |
sku_XXXXXXXXXXX | SKU of your product | Yes |
quantity |
number |
1 | Amount of items to be purchased | Yes |