Complete Implemenation of tenancy
This commit is contained in:
@@ -701,6 +701,35 @@ export async function getPaymentMethodConfigs(): Promise<{
|
||||
return fetchAPI('/v1/billing/payment-methods/available/');
|
||||
}
|
||||
|
||||
// Get payment methods for a specific country
|
||||
export async function getPaymentMethodsByCountry(countryCode?: string): Promise<{
|
||||
success: boolean;
|
||||
results: PaymentMethodConfig[];
|
||||
count: number;
|
||||
}> {
|
||||
const params = countryCode ? `?country=${countryCode}` : '';
|
||||
return fetchAPI(`/v1/billing/admin/payment-methods/${params}`);
|
||||
}
|
||||
|
||||
// Confirm manual payment (submit proof of payment)
|
||||
export async function confirmPayment(data: {
|
||||
invoice_id: number;
|
||||
payment_method: string;
|
||||
amount: string;
|
||||
manual_reference: string;
|
||||
manual_notes?: string;
|
||||
proof_url?: string;
|
||||
}): Promise<{
|
||||
success: boolean;
|
||||
message: string;
|
||||
payment: Payment;
|
||||
}> {
|
||||
return fetchAPI('/v1/billing/admin/payments/confirm/', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
}
|
||||
|
||||
export async function createManualPayment(data: {
|
||||
invoice_id?: number;
|
||||
amount: string;
|
||||
|
||||
Reference in New Issue
Block a user