Customize

Create Payment Link of Stripe

Summary

Create a payment link of Stripe.

A payment link is the URL of a product payment page created on Stripe. Users who have purchased the product can make a payment using that URL. For more details, see the Stripe’s documentation .

How to use

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 . This is a setting on the Stripe screen, not Customine.

There is no need to register product data in advance on Stripe. Customine’s “Create Payment Link of Stripe” automatically registers products on Stripe. Conversely, to link products that are already registered with Stripe to Kintone app 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 payment link. The created payment link can be checked from “Payment Links” on the Stripe screen.

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 payment link is created on Stripe, the combination of the payment link ID and URL will be set as the result of the action. For example, if “Create Payment Link of Stripe” is the first action, you can extract the ID of the payment link using the following expression:

= $1.id

Also, to extract a URL, write as follows. You can share this extracted URL with the person who purchased the product.

= $1.url

Parameters

Set Stripe API Key, Source Records, Mapping to Line Item, and Currency.

Stripe API Key

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:

  • Files: Write (required only when registering product images; it is unnecessary if no images are to be registered.)
  • Payment Links: Write
  • Prices: Write
  • Products: Write

Source Records

Specify one record for each product or service. The number of product details should match the number of records created within a single payment link.

If this parameter is omitted, the current page’s record will be used, and a payment link will be made for only one product or service. 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.

Mapping to Line Item

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 be a field of the “Source Records.”

Map to the following elements:

  • Product Code
    • If you specify this, if a product with the same product code is already registered on Stripe, the product data will be overwritten and updated. If the code is not already registered, it will be registered as a new code.
    • If omitted, product data will be newly registered on Stripe each time.
    • The code will not be hidden on the screen of the person who will purchase the product.
  • Product Name
    • This is the name of the product displayed on the screen of the person who will purchase the product.
    • This parameter is required.
  • Product Description
    • This is the product description displayed on the screen of the person who will purchase the product.
    • This parameter is optional.
  • Product Image
    • This is the product image displayed on the screen of the person who will purchase the product.
    • This parameter is optional.
    • To specify it, specify the Attachment field in the expression. The first image attached in that Attachment field will be the product image. Attached files other than images will be ignored.
      • If you know which file in the Attachment field is the product image, you can specify its index number. For example, to refer to the second file, use the following syntax:
        = Attachment Field[1]  
        

        Keep in mind that indexing starts from zero, so you should use 1 to indicate the second file.

    • The product image will be overwritten when you set this parameter.
    • If omitted or if no image is attached to the specified Attachment field, no image will be set for the product. In this case, the already set image will be maintained.
  • Unit Price
    • Specify how much to sell this product for per item in this payment link.
    • This parameter is required.
    • If the currency unit is in dollars, it is specified in cents. For example, to sell for 10 USD, specify 1000. Also, specify the euro in euro cents.
    • Provide the price, including tax.
  • Quantity
    • Specify how many to sell.
    • This parameter is optional. If omitted, it will be assumed to be 1.
  • Maximum Quantity, Minimum Quantity
    • If specified, the purchaser can adjust the quantity they wish to buy, limited to a selectable range of amounts provided here.
    • This parameter is optional. If both maximum and minimum are omitted, the purchaser cannot change the quantity and it will be fixed at the number specified in Quantity.

Currency

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.

Restrictions

  • The range of values that can be specified, such as unit price and quantity, and the supported image formats depend on the Stripe’s specifications.
  • The Rich text field is not supported. When specifying the value of the Rich text field in the product name and product description, the HTML is displayed as is.
  • You cannot register multiple images for a single product.