From ce0c1808fbf9a03f08a0d52700a0c8dbf6583fda Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 23 Mar 2025 06:03:38 +0000 Subject: [PATCH] Feat: validate live payment --- src/lib/sdk/billing.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index 68db777fb..1ad1b22f0 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -739,6 +739,14 @@ export class Billing { ); } + async validateInvoice(organizationId: string, invoiceId: string): Promise { + const path = `/organizations/${organizationId}/invoices/${invoiceId}/validate`; + const uri = new URL(this.client.config.endpoint + path); + return await this.client.call('PATCH', uri, { + 'content-type': 'application/json' + }); + } + async retryPayment( organizationId: string, invoiceId: string,