POST
/
checkouts

Body parameters

items
array

Required if the parameters amount and currency are not provided.

The items are the products that are being sold.

amount
integer

Required if the parameter items is not provided.

The total amount of the checkout.

currency
string

Required if the parameter amount is provided.

A lowercase ISO currency code. Currently supported currencies are: “dzd”.

payment_method
string
default: "edahabia"

The payment method that will be used to pay the checkout. Currently supported payment methods are: “edahabia”, “cib” and “chargily_app”. The customer can always change the payment method at the checkout page.

When the payment method is “chargily_app”, a “qr_code_url” param will be returned in the response.

success_url
string
required

The URL where your customer will be redirected after a successful payment.

customer_id
string

The ID of an existing Customer.

failure_url
string

The URL where your customer will be redirected after a failed or canceled payment.

webhook_endpoint
string

The URL of your endpoint that will receive the webhook events sent by Chargily Pay.

description
string

A description of the checkout. You can use this field to save a note about the checkout.

locale
string

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

pass_fees_to_customer
boolean

DEPRECATED, use chargily_pay_fees_allocation instead.

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

chargily_pay_fees_allocation
string

Can be one of “customer”, “merchant” or “split”.

Choose who is going to pay Chargily Pay fees (“Merchant” means you will pay the fees, “Customer” means the customer will pay the fees, “Split” means you will split the fees with the customer).

shipping_address
string

The shipping address of the customer for the checkout.

collect_shipping_address
boolean

A Boolean value indicates whether the shipping address should be collected from the customer.

percentage_discount
integer

Prohibited if the parameter amount_discount is provided.

A percentage discount that will be applied to the total amount of the checkout.

amount_discount
integer

Prohibited if the parameter percentage_discount is provided.

An amount discount that will be applied to the total amount of the checkout.

metadata
array

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

Returns

If the request is successful, it returns a checkout object.