Articles on: Conception examples
This article is also available in:

💳 Paying with Stripe

To set up a payment system, you can use the Stripe API.

An API (Application Programming Interface) is a set of functionalities made available to a client/user via a library (methods of a programming language) or a web service.

Setting up Stripe:



Firstly, you need to have a Stripe account. Of course, you also need to add products to sell.

Two other pieces of information are necessary before configuring Celestory.

Firstly, in Stripe, under the "Product catalogue" section, when viewing the details of a product, you need to retrieve the price ID associated with the product. It is through this ID that you will be able to generate a link for users to pay for their order. The ID can be found at the bottom of the detail page by clicking on "A new price called price_XXX was created". From the window that opens, scroll down the right-hand side of the page, and the price ID will be highlighted. Clicking on it allows you to quickly copy and paste it.

Secondly, you need to retrieve an API key that will identify which account will receive the payment money. From any page, you can type "API keys" in the search bar. From the corresponding page, retrieve the public key.

Setting up Celestory:



For Celestory, there's not much to do other than creating the sales site. However, for ease of use, it might be interesting to format from the JavaScript part of an HTML5 block (if the project includes a web page) or from a Text Format block, the body of the HTTP request that will allow the Stripe API to create a payment link (this will be explained in the Voltask section).

Setting up Voltask:



For Voltask, you will need to use the HTTP Request block:
- the method is POST
- the URL is https://api.stripe.com/v1/payment_links
- the body will consist of the products to be paid for. It should be formatted as follows: line_items[0][price]=price_XXX&line_items[0][quantity]=X. price_XXX corresponds to the price ID retrieved in the Setting up Stripe section. X corresponds to the number of products to be paid for (for example, if a customer buys two apples, X will be 2). If multiple products need to be paid for, repeat the previous line but change 0 to 1, and so on, ensuring to connect lines with &.
- the header will be formatted as follows: {"Authorization":"Bearer pk_XXX"}. Here, pk_XXX is the API key retrieved earlier.

For a direct example in Celestory, follow this link.

Updated on: 16/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!