Skip to content

Commit

Permalink
update paymentlink types (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitdas13 authored May 7, 2024
1 parent c225f94 commit 4369fdb
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion lib/types/paymentLink.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -177,7 +212,7 @@ export declare namespace PaymentLinks {
/**
* Pass transfer details such as amount, account, linked account information and more
*/
transfers: PartialOptional<Transfers.RazorpayOrderCreateRequestBody, 'on_hold'>[]
transfers?: PartialOptional<Transfers.RazorpayOrderCreateRequestBody, 'on_hold'>[];
}
}

Expand All @@ -196,6 +231,7 @@ export declare namespace PaymentLinks {

interface RazorpayCustomizeCheckout {
checkout:
| RazorpayCheckoutDisplayPayment
| RazorpayCheckoutRenameLabels
| RazorpayCheckoutChangeBusinessName
| RazorpayCheckoutPrefillCard
Expand All @@ -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.
Expand Down

0 comments on commit 4369fdb

Please sign in to comment.