const response = await fetch(`${flipApiHost}/v2/pwf/bill`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Basic ${Buffer.from(flipAPiKey + ':').toString('base64')}`, 'idempotency-key': invoiceId }, body: JSON.stringify({ title: `${invoiceId}`, amount: parseInt(totalAmount), sender_name: customer.name, sender_email: customer.User.email, expired_date: expiredDate, step: '2', type: 'SINGLE', redirect_url: `${flipApiRedirect}/invoices/${invoiceId}` }) });