Enough talking, let’s get to action!

Sending your first API request - create a new Product.

Let’s create a new product called Super Product.

Don’t forget to replace <YOUR_SECRET_KEY_HERE> with your API Secret Key
For more details about the Product Create endpoint, refer to its API Reference.
curl --request POST \
  --url https://pay.chargily.net/test/api/v2/products \
  --header 'Authorization: Bearer <YOUR_SECRET_KEY_HERE>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Super Product"
}'

Response

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

json
{
    "id": "01hhyjnrdbc1xhgmd34hs1v3en",
    "entity": "product",
    "livemode": false,
    "name": "Super Product",
    "description": null,
    "images": [],
    "metadata": [],
    "created_at": 1702907011,
    "updated_at": 1702911993
}

Which is the Product object you just created.

Good job!

Next

Next, you’ll create a Price for this product.

Create a price

Let’s now create a Price for the Product you just created.