Create Checkout Session of Stripe.
The checkout session is similar to a payment link, but the checkout session is valid only once. Once the payment is made from that session, the URL will automatically become invalid. The session will automatically become invalid if the payment is not made within 24 hours.
You need to issue the Stripe API key in advance. Stripe initially provides a standard key, but you should issue a restricted key instead of using the standard one. For details of the procedure, please visit Stripe’s website . The setting should be done on Stripe, not Customine.
There is no need to register product data in advance on Stripe. Customine’s “Create Checkout Session of Stripe” automatically registers products on Stripe. Conversely, to link products that are already registered with Stripe to Kintone records, add metadata to the Stripe product and set the product code with the key product_code
.
Executing this action will register a product and price data on Stripe and create a checkout session.
If you include the product code in the Mapping to Line Item, the product data on Stripe will be updated if that product code is already registered. If not, new product data will be added on Stripe.
When this action is executed and a checkout session is created on Stripe, the combination of the checkout session ID and URL will be set as the result of the action. For example, if the action of “Create Checkout Session of Stripe” is the first action, and you want to extract the ID of the checkout session, write an expression like the following:
= $1.id
Similarly, to extract a URL, write it as follows. You can share this URL with the person who purchased the product.
= $1.url
Set Stripe API Key, Source Records, Mapping to Line Item, Currency, and Success URL.
Specify the API key that was issued in advance.
There are three types of keys in Stripe’s API: Standard Key’s Publishable Key, Standard Key’s Secret Key, and Restricted Key, but you need to use the Restricted Key.
This API key requires the following permissions:
Specify a separate record for each product or service. A number of product details equal to the number of records will be created within a single checkout session.
If omitted, the record of the current page will be used, and a checkout session with only one product or service will be created. For the record list, the new record, and the edit record pages, this parameter cannot be omitted.
Each record must contain at least one line of information. If a record is empty, a runtime error will occur.
Enter the detailed information of the statement in a mapping format.
In mapping, expressions can be used. If a field code is specified in the expression during mapping, that field will become a field of the “Source Records.”
Map to the following elements:
= Attachment Field[1]
Keep in mind that indexing starts from zero, so you should use 1 to indicate the second file.
Select a currency unit. You can choose yen, dollars, or euros. Other currencies are not supported.
When you specify the currency as dollars or euros, pay attention to the unit of the unit price in Mapping to Line Item.
This screen transitions after the payment of the person who purchased the product is successful.
In general, create a screen to display a message like “Thank you for your payment” in advance and specify the URL of the screen. In the case of Create Payment Link of Stripe, Stripe has prepared this page, but for the checkout session, you need to prepare it yourself.