From 4369fdb1c4b456a5c632240b25bb29d5b7933226 Mon Sep 17 00:00:00 2001 From: Ankit Das <89454448+ankitdas13@users.noreply.github.com> Date: Tue, 7 May 2024 18:47:28 +0530 Subject: [PATCH] update paymentlink types (#410) --- lib/types/paymentLink.d.ts | 60 +++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/lib/types/paymentLink.d.ts b/lib/types/paymentLink.d.ts index 093b52d0..5a4cf2bd 100644 --- a/lib/types/paymentLink.d.ts +++ b/lib/types/paymentLink.d.ts @@ -166,6 +166,41 @@ export declare namespace PaymentLinks { | RazorpayTransferPayment | RazorpayOffer | RazorpayCustomizeCheckout + | RazorpayBankAccount + | RazorpayNetBankingPayment + } + + interface RazorpayBankAccount { + method?: string; + bank_account: { + account_number: string; + name: string; + ifsc: string; + } + /** + * Details of the products. + * Check [doc](https://razorpay.com/docs/api/orders/products/create-pl-with-details/) + */ + products: Products; + } + + interface Products { + type: string; + plan: string; + folio: string; + amount: string; + option: string; + scheme: string; + receipt: string; + mf_member_id: string; + mf_user_id: string; + mf_partner: string; + mf_investment_type: string; + mf_amc_code: string; + } + + interface RazorpayNetBankingPayment { + order: RazorpayBankAccount } interface RazorpayTransferPayment { @@ -177,7 +212,7 @@ export declare namespace PaymentLinks { /** * Pass transfer details such as amount, account, linked account information and more */ - transfers: PartialOptional[] + transfers?: PartialOptional[]; } } @@ -196,6 +231,7 @@ export declare namespace PaymentLinks { interface RazorpayCustomizeCheckout { checkout: + | RazorpayCheckoutDisplayPayment | RazorpayCheckoutRenameLabels | RazorpayCheckoutChangeBusinessName | RazorpayCheckoutPrefillCard @@ -207,6 +243,28 @@ export declare namespace PaymentLinks { | RazorpayCheckoutThematicChange } + interface RazorpayCheckoutDisplayPayment { + config: { + display: { + blocks: { + banks: { + name: string; + instruments: [ + { + method: string, + banks: string[] + } + ]; + }; + }; + sequence: string[]; + preferences: { + show_default_blocks: boolean; + }; + }; + }; + } + interface RazorpayCheckoutRenameLabels { /** * Options to rename the labels for partial payment fields in the checkout form.