Create a Price

Don’t forget to replace <YOUR_SECRET_KEY_HERE> with your API Secret Key

For more details about the Price Create endpoint, refer to its API Reference.

curl --request POST \
  --url \
  --header 'Authorization: Bearer <YOUR_SECRET_KEY_HERE>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 5000,
  "currency": "dzd",
  "product_id": "01hhyjnrdbc1xhgmd34hs1v3en"


If everything worked, you should get a response like this:

   "id": "01hhy57e5j3xzce7ama8gtk7m0",
   "entity": "price",
   "livemode": false,
   "amount": 5000,
   "currency": "dzd",
   "metadata": null,
   "created_at": 1702892910,
   "updated_at": 1702892910,
   "product_id": "01hhyjnrdbc1xhgmd34hs1v3en"

Which is the Price object you just created.


Now that you have a Price, you can use it to create a Checkout for your customers to pay.

Create a Checkout

You can now create a Checkout using the Price you just created.