feat: view invoices from stripe portal
This commit is contained in:
parent
7725c1ce71
commit
631db83595
|
|
@ -506,7 +506,7 @@ export const MainBillingComponent: FC<{
|
|||
<PurchaseCrypto />
|
||||
{!!subscription?.id && (
|
||||
<div className="flex justify-center mt-[20px] gap-[10px]">
|
||||
<Button onClick={updatePayment}>Update Payment Method</Button>
|
||||
<Button onClick={updatePayment}>Update Payment Method / Invoices History</Button>
|
||||
{isGeneral && !subscription?.cancelAt && (
|
||||
<Button
|
||||
className="bg-red-500"
|
||||
|
|
|
|||
|
|
@ -348,15 +348,7 @@ export class StripeService {
|
|||
async createBillingPortalLink(customer: string) {
|
||||
return stripe.billingPortal.sessions.create({
|
||||
customer,
|
||||
flow_data: {
|
||||
after_completion: {
|
||||
type: 'redirect',
|
||||
redirect: {
|
||||
return_url: process.env['FRONTEND_URL'] + '/billing',
|
||||
},
|
||||
},
|
||||
type: 'payment_method_update',
|
||||
},
|
||||
return_url: process.env['FRONTEND_URL'] + '/billing',
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue