import { OrcusPay } from '@orcustech/orcuspay'
const orcus = new OrcusPay({
accessKey: 'ak_test_xxxxx',
secretKey: 'sk_test_xxxxx',
})
const session = await orcus.createCheckoutSession({
success_url: 'https://yoursite.com/success?session={CHECKOUT_SESSION_ID}',
cancel_url: 'https://yoursite.com/cancel',
line_items: [
{
quantity: 1,
price_data: {
unit_amount: 50000, // 500.00 BDT in paisa
product_data: {
name: 'Premium Plan',
},
},
},
],
currency: 'USD', // optional, defaults to BDT
customer: {
name: 'Test Customer',
email: 'customer@example.com',
phone: '01700000000',
},
})
// Redirect customer to session.url