feat: update frontend billing api for mollie (country, vat_id, payment method update)
This commit is contained in:
@@ -72,6 +72,8 @@ export interface CreateCheckoutParams {
|
||||
plan_id: string
|
||||
interval: string
|
||||
limit: number
|
||||
country: string
|
||||
vat_id?: string
|
||||
}
|
||||
|
||||
export async function createCheckoutSession(params: CreateCheckoutParams): Promise<{ url: string }> {
|
||||
@@ -81,6 +83,13 @@ export async function createCheckoutSession(params: CreateCheckoutParams): Promi
|
||||
})
|
||||
}
|
||||
|
||||
/** Creates a Mollie checkout session to update the payment mandate. */
|
||||
export async function updatePaymentMethod(): Promise<{ url: string }> {
|
||||
return apiRequest<{ url: string }>('/api/billing/update-payment-method', {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
export interface Order {
|
||||
id: string
|
||||
total_amount: number
|
||||
|
||||
Reference in New Issue
Block a user