POST
/
payment-links
curl --request POST \
  --url https://pay.chargily.net/test/api/v2/payment-links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "items": [
    {
      "price": "<string>",
      "quantity": 123,
      "adjustable_quantity": true
    }
  ],
  "after_completion_message": "<string>",
  "locale": "<string>",
  "pass_fees_to_customer": true,
  "metadata": {}
}'
{
   "id": "01hhhtvg4w7gk4mcaxmgzb2ynw",
   "entity": "payment_link",
   "livemode": false,
   "name": "Payment Link for Facebook page.",
   "active": 1,
   "after_completion_message": "The product will arrive in 03 days.",
   "locale": "ar",
   "pass_fees_to_customer": false,
   "metadata": [],
   "created_at": 1702479380,
   "updated_at": 1702479380,
   "url": "https://pay.chargily.dz/test/payment-links/01hhhtvg4w7gk4mcaxmgzb2ynw"
}

Body parameters

name
string
required

A String representing the name of the payment link, will not be shown to customers, it helps you to organize payment links.

items
array
required

The items are the products that are being sold.

after_completion_message
string

A message which will be displayed to the customer after a successful payment.

locale
string

The language of the checkout page, accepted values are: ‘ar’, ‘en’ or ‘fr’.

pass_fees_to_customer
boolean

A Boolean value indicating whether the Chargily Pay fees will be paid by you, the merchant, or by your customers.

metadata
key-value array

A Set of key-value pairs that can be used to store additional information about the payment link.

Returns

If the request is successful, it returns a payment link object.