Understanding the Payment Flow
1. Button Click Event
button.addEventListener('click', async () => {
// User clicks the payment button
});2. Generate Checkout URL
const response = await fetch(
'https://api.kira-pay.com/api/link/generate',
{
method: 'POST',
headers: {
'x-api-key': this.config.apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({
price: this.config.price,
customOrderId: this.config.customOrderId,
}),
}
);3. Open Checkout Modal
4. User Completes Payment
5. Payment Confirmation
Last updated
Was this helpful?