POST
/
checkout
/
session
curl --request POST \
     --url https://api.orcus.com.bd/api/checkout/session \
     --header 'X-AUTH-ACCESS-KEY: ak_123' \
     --header 'X-AUTH-SECRET-KEY: sk_123' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "success_url": "https://example.com",
  "cancel_url": "https://example.com",
  "customer": {
    "name": "Rahim Ahmed",
    "email": "[email protected]",
    "phone": "01827297490",
    "address": "House 81, Road 22, Sector 73, Uttara",
    "city": "Dhaka"
  },
  "line_items": [
    {
      "quantity": 4,
      "price_data": {
        "unit_amount": 3000,
        "product_data": {
          "name": "Potato (kg)"
        }
      }
    }
  ],
  "meta_data": {
    "invoice_id": "NSOIENKXNY"
  }
}
'
{
  "url": "https://checkout.orcus.com.bd/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11"
}

Body

success_url
string

The URL to redirect the user to after a successful payment.

cancel_url
string

The URL to redirect the user to if they cancel the payment process.

customer
object

An object containing the customer’s information.

line_items
array

An array of objects representing the items in the transaction.

meta_data
JSON

An object containing additional data associated with the transaction.

Response

url
string

URL of the payment page.