curl --request POST \
--url https://brain.orcuspay.com/api/v1/checkout/sessions \
--header 'x-api-key: ak_test_123' \
--header 'x-api-secret: sk_test_123' \
--header 'content-type: application/json' \
--data '{
"success_url": "https://example.com/success?session={CHECKOUT_SESSION_ID}",
"cancel_url": "https://example.com/cancel",
"customer": {
"name": "Rahim Ahmed",
"email": "rahim@gmail.com",
"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)"
}
}
}
],
"currency": "BDT",
"meta_data": {
"invoice_id": "NSOIENKXNY"
}
}'
{
"data": {
"id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"payment_id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"reference": "payabc123",
"status": "PENDING",
"currency": "BDT",
"url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11",
"checkout_url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11"
}
}
Checkout Sessions
Create Session
Creates a checkout session and returns a hosted payment page URL.
POST
/
api
/
v1
/
checkout
/
sessions
curl --request POST \
--url https://brain.orcuspay.com/api/v1/checkout/sessions \
--header 'x-api-key: ak_test_123' \
--header 'x-api-secret: sk_test_123' \
--header 'content-type: application/json' \
--data '{
"success_url": "https://example.com/success?session={CHECKOUT_SESSION_ID}",
"cancel_url": "https://example.com/cancel",
"customer": {
"name": "Rahim Ahmed",
"email": "rahim@gmail.com",
"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)"
}
}
}
],
"currency": "BDT",
"meta_data": {
"invoice_id": "NSOIENKXNY"
}
}'
{
"data": {
"id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"payment_id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"reference": "payabc123",
"status": "PENDING",
"currency": "BDT",
"url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11",
"checkout_url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11"
}
}
Body
string
required
The URL to redirect the user to after a successful payment. Supports placeholders:
{CHECKOUT_SESSION_ID}, {PAYMENT_ID}, {REFERENCE}.string
required
The URL to redirect the user to if they cancel the payment process.
object
array
required
An array of objects representing the items in the transaction.
Show Toggle object
Show Toggle object
number
The number of units of the item being purchased.
object
An object containing pricing details for the item.
string
ISO 4217 currency code (e.g.
BDT, USD, EUR). Defaults to BDT. When set, the checkout page filters payment methods: BDT shows local methods only, any other currency shows international methods only. Omit to show all enabled methods.JSON
An object containing additional data associated with the transaction.
Response
object
Show Toggle object
Show Toggle object
string
The checkout session / payment ID.
string
The payment ID (same as
id).string
A short human-readable payment reference.
string
Payment status.
PENDING on creation.string
The currency code for this session (e.g.
BDT, USD).string
URL of the hosted checkout page. Redirect the customer here.
string
Same as
url.curl --request POST \
--url https://brain.orcuspay.com/api/v1/checkout/sessions \
--header 'x-api-key: ak_test_123' \
--header 'x-api-secret: sk_test_123' \
--header 'content-type: application/json' \
--data '{
"success_url": "https://example.com/success?session={CHECKOUT_SESSION_ID}",
"cancel_url": "https://example.com/cancel",
"customer": {
"name": "Rahim Ahmed",
"email": "rahim@gmail.com",
"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)"
}
}
}
],
"currency": "BDT",
"meta_data": {
"invoice_id": "NSOIENKXNY"
}
}'
{
"data": {
"id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"payment_id": "pay_prod_eed087950441ke82b9f2ee4884e78c11",
"reference": "payabc123",
"status": "PENDING",
"currency": "BDT",
"url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11",
"checkout_url": "https://dash.orcuspay.com/pay/pay_prod_eed087950441ke82b9f2ee4884e78c11"
}
}