curl --request POST \
--url 'https://brain.orcuspay.com/api/v1/payment-links' \
--header 'x-api-key: ak_prod_xxxxxxxxxxxx' \
--header 'x-api-secret: sk_prod_xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--data '{
"title": "Order #1234",
"amount": 1500,
"description": "Payment for your recent order",
"is_reusable": false,
"success_url": "https://yourstore.com/thank-you"
}'
const res = await fetch('https://brain.orcuspay.com/api/v1/payment-links', {
method: 'POST',
headers: {
'x-api-key': 'ak_prod_xxxxxxxxxxxx',
'x-api-secret': 'sk_prod_xxxxxxxxxxxx',
'content-type': 'application/json',
},
body: JSON.stringify({
title: 'Order #1234',
amount: 1500,
description: 'Payment for your recent order',
is_reusable: false,
success_url: 'https://yourstore.com/thank-you',
}),
})
const link = await res.json()
console.log(link.url) // send this to your customer
$ch = curl_init('https://brain.orcuspay.com/api/v1/payment-links');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ak_prod_xxxxxxxxxxxx',
'x-api-secret: sk_prod_xxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Order #1234',
'amount' => 1500,
'is_reusable' => false,
]),
]);
$response = json_decode(curl_exec($ch), true);
echo $response['url']; // send this to your customer
{
"id": "pl_abc12345",
"url": "https://pay.orcuspay.com/aBcDeFgH",
"slug": "aBcDeFgH",
"title": "Order #1234",
"description": "Payment for your recent order",
"amount": 1500.00,
"currency": "BDT",
"is_reusable": false,
"is_active": true,
"current_uses": 0,
"max_uses": null,
"expires_at": null,
"success_url": "https://yourstore.com/thank-you",
"created_at": "2025-04-04T10:00:00.000Z",
"updated_at": "2025-04-04T10:00:00.000Z"
}
{
"error": "title is required"
}
Payment Links
Create a Payment Link
Creates a new payment link that you can share with your customers.
POST
/
api
/
v1
/
payment-links
curl --request POST \
--url 'https://brain.orcuspay.com/api/v1/payment-links' \
--header 'x-api-key: ak_prod_xxxxxxxxxxxx' \
--header 'x-api-secret: sk_prod_xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--data '{
"title": "Order #1234",
"amount": 1500,
"description": "Payment for your recent order",
"is_reusable": false,
"success_url": "https://yourstore.com/thank-you"
}'
const res = await fetch('https://brain.orcuspay.com/api/v1/payment-links', {
method: 'POST',
headers: {
'x-api-key': 'ak_prod_xxxxxxxxxxxx',
'x-api-secret': 'sk_prod_xxxxxxxxxxxx',
'content-type': 'application/json',
},
body: JSON.stringify({
title: 'Order #1234',
amount: 1500,
description: 'Payment for your recent order',
is_reusable: false,
success_url: 'https://yourstore.com/thank-you',
}),
})
const link = await res.json()
console.log(link.url) // send this to your customer
$ch = curl_init('https://brain.orcuspay.com/api/v1/payment-links');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ak_prod_xxxxxxxxxxxx',
'x-api-secret: sk_prod_xxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Order #1234',
'amount' => 1500,
'is_reusable' => false,
]),
]);
$response = json_decode(curl_exec($ch), true);
echo $response['url']; // send this to your customer
{
"id": "pl_abc12345",
"url": "https://pay.orcuspay.com/aBcDeFgH",
"slug": "aBcDeFgH",
"title": "Order #1234",
"description": "Payment for your recent order",
"amount": 1500.00,
"currency": "BDT",
"is_reusable": false,
"is_active": true,
"current_uses": 0,
"max_uses": null,
"expires_at": null,
"success_url": "https://yourstore.com/thank-you",
"created_at": "2025-04-04T10:00:00.000Z",
"updated_at": "2025-04-04T10:00:00.000Z"
}
{
"error": "title is required"
}
Headers
string
required
Your API access key.
string
required
Your API secret key.
Body
string
required
A short title for the payment (e.g. “Order #1234” or “Monthly subscription”).
number
required
Payment amount in taka (e.g.
500 for ৳500).string
Optional description shown to the customer on the payment page.
string
default:"BDT"
Currency code. Currently only
BDT is supported.boolean
default:"false"
Set to
true to allow multiple customers to pay using the same link. When false, the link deactivates after the first successful payment.number
Maximum number of successful payments allowed. Only applicable when
is_reusable is true. Omit for unlimited uses.string
ISO 8601 datetime string after which the link will no longer accept payments (e.g.
"2025-12-31T23:59:59Z"). Omit for no expiry.string
URL to redirect the customer to after a successful payment.
Response
Returns the newly created payment link object.string
Unique payment link ID.
string
The shareable payment link URL to send to your customers.
string
The URL slug identifier.
string
Payment link title.
string
Description, if provided.
number
Amount in BDT.
string
Currency code.
boolean
Whether the link is reusable.
boolean
Always
true on creation.number
Always
0 on creation.number
Max uses limit, if set.
string
Expiry datetime, if set.
string
Redirect URL after payment.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
curl --request POST \
--url 'https://brain.orcuspay.com/api/v1/payment-links' \
--header 'x-api-key: ak_prod_xxxxxxxxxxxx' \
--header 'x-api-secret: sk_prod_xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--data '{
"title": "Order #1234",
"amount": 1500,
"description": "Payment for your recent order",
"is_reusable": false,
"success_url": "https://yourstore.com/thank-you"
}'
const res = await fetch('https://brain.orcuspay.com/api/v1/payment-links', {
method: 'POST',
headers: {
'x-api-key': 'ak_prod_xxxxxxxxxxxx',
'x-api-secret': 'sk_prod_xxxxxxxxxxxx',
'content-type': 'application/json',
},
body: JSON.stringify({
title: 'Order #1234',
amount: 1500,
description: 'Payment for your recent order',
is_reusable: false,
success_url: 'https://yourstore.com/thank-you',
}),
})
const link = await res.json()
console.log(link.url) // send this to your customer
$ch = curl_init('https://brain.orcuspay.com/api/v1/payment-links');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ak_prod_xxxxxxxxxxxx',
'x-api-secret: sk_prod_xxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Order #1234',
'amount' => 1500,
'is_reusable' => false,
]),
]);
$response = json_decode(curl_exec($ch), true);
echo $response['url']; // send this to your customer
{
"id": "pl_abc12345",
"url": "https://pay.orcuspay.com/aBcDeFgH",
"slug": "aBcDeFgH",
"title": "Order #1234",
"description": "Payment for your recent order",
"amount": 1500.00,
"currency": "BDT",
"is_reusable": false,
"is_active": true,
"current_uses": 0,
"max_uses": null,
"expires_at": null,
"success_url": "https://yourstore.com/thank-you",
"created_at": "2025-04-04T10:00:00.000Z",
"updated_at": "2025-04-04T10:00:00.000Z"
}
{
"error": "title is required"
}