react-razorpay
react-razorpay copied to clipboard
Added `razorpay_subscription_id` on success handler args
Updated with reference to changes in
- Subscriptions API: https://razorpay.com/docs/payments/subscriptions/apis/
- Authorisation transaction: https://razorpay.com/docs/api/payments/subscriptions/#authentication-transaction
Success Handler for Authorisation Transaction
Added the field - razorpay_subscription_id as a return type for the same function args.
Optional Parameters Updated
As per the Razorpay documentation, some parameters are now optional based on the transaction type. The order_id and amount fields are not always required, depending on the specific transaction. This enhancement allows for more flexibility and customization when using the Razorpay API.
Reference: https://razorpay.com/docs/api/payments/subscriptions/#authentication-transaction
interface RazorpayOptions {
...
key: string;
amount?: string;
currency?: string;
name?: string;
order_id?: string;
...
}
This update provides developers with more control and adaptability in their interactions with the Razorpay API.
Thanks! If any issue with this PR let me know if I've done anything wrong, happy to hear your thoughts on it.