Create a Checkout

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

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

curl --request POST \
  --url \
  --header 'Authorization: Bearer <YOUR_SECRET_KEY_HERE>' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
      "price": "01hhy57e5j3xzce7ama8gtk7m0",
      "quantity": 1
  "success_url": ""


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

   "id": "01hj5n7cqpaf0mt2d0xx85tgz8",
   "entity": "checkout",
   "livemode": false,
   "amount": 5000,
   "currency": "dzd",
   "fees": 0,
   "fees_on_merchant": 0,
   "fees_on_customer": 0,
   "pass_fees_to_customer": null,
   "chargily_pay_fees_allocation": "customer",
   "status": "pending",
   "locale": "ar",
   "description": null,
   "metadata": null,
   "success_url": "",
   "failure_url": null,
   "payment_method": null,
   "invoice_id": null,
   "customer_id": "01hj150206g0jxnh5r2yvvdrna",
   "payment_link_id": null,
   "created_at": 1703144567,
   "updated_at": 1703144567,
   "shipping_address": null,
   "collect_shipping_address": 0,
   "discount": null,
   "amount_without_discount": null,
   "checkout_url": ""

Which is the Checkout object you just created.

You can see in the Response a parameter called checkout_url:

"checkout_url": ""

This is the URL you can redirect your customer to, to complete the payment.

Now, when your customer goes to the payment link and successfully pays, how can your website or app be notified about this? This is important for handling post-payment actions, like updating an order status to “paid”. We use Webhooks for this.


You will see now how to make your website or application react to a successful payment using Webhooks.

Receive webhooks

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